Speed up staging view tree viewer management
In StagingView:
1. Don't call AbstractTreeViewer.getVisibleExpandedElements() multiple
times. In fact, don't call it at all. We do have the tree hierarchy,
and the tree viewer uses a hash map, so traversing the known sub-
hierarchy explicitly is much faster.
2. Avoid duplicate paths to add (or remove) by using sets instead of
lists.
In StagingViewContentProvider:
3. Speed up getStagingEntriesFiltered and hasVisibleChildren by
traversing the wanted sub-hierarchy explicitly.
4. Massively reduce the number of calls to getFilterPattern().
Bug:535856
Change-Id: I86876119c58f58305e722a832f8950c913d1f2d3
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>