[git] Simplify method to get branches: use branch names.

We need only branch names, not GitBranch objects => remove extra
conversion, and return Strings right away.

Also, don't return null, return an empty list.

(cherry picked from commit f95b1226c424e537b2c5803b8a1f0b028668f9aa)
[git] Move & rename method to get branches to GitBranchUtil for reuse
(cherry picked from commit f78700e)
[log] Fix "Containing branches" for filtered list & for Mercurial

PROBLEM:
We were calculating containing branches ourselves by navigating from
the given commit upwards, until reaching leafs of the graph.
It doesn't work in two scenarios:
* If current model contains filtered commits received from the VCS,
  we have to find the Node by Hash first (which takes time,
  but not much), and we also much have the DataPack for the whole log
  ready (which would make user wait for the whole log skeleton
  loading - and this is unacceptable). IDEA-117212
* Mercurial heavy-weight branches are not labels/references,
  they are properties of commits => this algorithm just doesn't work
  for them.

SOLUTION:
Query the VCS for branches containing the given commit.
(previous fast search-on-graph implementation can be returned later
for those VcsLogProviders which have only light branches (Git),
and only if the graph is ready.

DETAILS:
* Introduce VcsLogProvider#getContainingBranches. Use existing method
  in git4idea; Mercurial implementation will follow.
* ContainingBranchesGetter: remove the previous algorithm; call the
  VcsLogProvider to get the information; adjust parameters accordingly.
* Identify branches as Strings instead of VcsRef: there are
  difficulties with Mercurial branches otherwise, and we need just
  branch names for now.

(cherry picked from commit c791b465bfb9e0ee64ceb054c9e23e6d8b73cc9b)
[log] Separate loading indicator for "Contained in branches"

Details are loaded in a batch and are preloaded on start and in
certain cases, while "contained in branches" information need to be
queried for each commit individually.

To not make user wait to see details while "contained in branches" is
loading, show a separate small loading icon for this process.

(cherry picked from commit 7c6bb198ae241f0854dc4963b4dae269b6bc8d9e)
[git] remove unused method

(cherry picked from commit 587fd52d8cdc2632be77cddd2bb7e189c61cd953)
[git] IDEA-117500 Don't copy, just wrap in unmodifiable

(cherry picked from commit 30dc10ce4cb55684cde560b8b4497e0b9689ae34)
[git] Don't modify the unmodifiable collection
(cherry picked from commit 007dc0d)
[log] IDEA-117500 Optimize grouping of branch references

Instead of iterating over the list of all branches for each passed
VcsRef, do the following:
* group refs by root
* for each root prepare sets and map of local branches,
  tracked remote branched and non-tracked remote branches.
* for each ref in this root check if it is contained in one of the sets.

(cherry picked from commit 1bb8fa17b55f661511f7f42897cb23137f1cda75)
[log] IDEA-117500 Don't repaint branches panel on every updateUI

VcsLogUI.updateUI is called frequently (e.g. almost on every click),
in particular to repaint the graph and highlight the currently
selected branch.

And the BranchesPanel should be repainted only when the set of
branches changes, which may happen only on refresh => subscribe the
panel to git-log-refresh events and rebuild the panel then.

(cherry picked from commit 778f00240c643ae1445d5f62566c878ef9b4406e)
[log] IDEA-115675 IDEA-116040 Fix table columns sizing

* Set sizes of table columns once, after the actual TableModel with
  commits is applied to the table. Don't set sizes again afterwards.
* Don't hardcode sizes:
  - let commit column occupy as much as possible;
  - let author column be as wide as the longest person name among the
    recent commits;
  - let the date be as wide as needed (no need to calculate,
    because dates are always nearly the same).

Implemented with the great help of Vassiliy Kudryashov.

(cherry picked from commit 805b67cd072d74abe16d5cadbedfa01a51765d83)
[log] fix name of variable

(cherry picked from commit c1e0536b5307f40f7aa20af41762be7a4f846925)
[log] Fix background of the details panel content
(cherry picked from commit 2ad2cba)
[log] Fix showing dot in the root table header

(cherry picked from commit 6d8ac447846f42f6acea38736d894c1f32d72f24)