[vcs] cleanup: String.format() to ease reading

(cherry picked from commit bfc8d2343b99c31f2225c58e779c2293e3168c25)
[vcs] Don't notify about "less interesting" unregistered roots

IDEA-87769 roots not under project dir;
IDEA-98781 roots under ignored directories.

But still show them in the Settings.

(cherry picked from commit 1dd4c35d1d88ec93e339d09d4c842ad845e3f98e)
[log] IDEA-127576 Collect log commit count statistics

(cherry picked from commit a33016e9206da4d75617f26857312f9a9cd78e8e)
[vcs] IDEA-127576 Ensure property key doesn't contain invalid chars

(cherry picked from commit dbf87578e573e087094fba40d53798dd7b42d0e8)
[vcs] IDEA-127576 simplify: use MultiMap & size instead of Map<VcsKey, Integer>

(cherry picked from commit 6a153c195ca952ab51b90ab8dba22943f6b27d79)
[log] IDEA-132218 Fix in-memory filter when old branch filter is active

When filtering in memory, we walk down by the permanent graph => we
need to check each commit whether it matches the branch filter as
well, otherwise we get commits which match username only => receive a
visible graph with 0 visible commits.

(cherry picked from commit f8c8846deff224f870ff4a1d939e1e4c5d59e100)
FrameWrapper: provide Project by data key

This fixes IDEA-131489

(cherry picked from commit 2642f4cf0963aa8213d5d183cdf0fa82bfd14d71)
[log] IDEA-121949 Fix filtering by non-existent branch

(cherry picked from commit a3dd3c707543c2b811922e4fc2b3655d4b4452cd)
[log] Ignore "All data is illegal" during refresh

This shouldn't actually happen, but it happens so rarely and is so
hard to debug, so let's just log the fact and reload the whole log.

(cherry picked from commit 5b71a825fe8705755fa4701ecddc8fba8fabc80d)
[vcs] IDEA-127576 Fix access to log's DataPack in statistics.

(cherry picked from commit d20f5712948f56623972a8de8ea469ac42708739)
[git] Don't spam "Couldn't find branch with name" & simplify

Although it might indicate an inconsistency in our data structures,
it can also be a valid situation, e.g. when branch was removes,
but the record from .git/config wasn't removed.

(cherry picked from commit 30f65070cb278b67c43182b2baa3dadc7e0e0c4e)
[git] IDEA-130702 Don't spam "No remote found with name" & simplify

(cherry picked from commit b2e4365834f589a1d08b8ff91051c332a5b8358e)
cleanup: remove unused methods

(cherry picked from commit 4e197ef308cc4cdcc746693a73c05e437e403e26)
[git] IDEA-132492 Don't show origin/HEAD in log + test

+ add a test for this to GitRepositoryReaderTest, although
GitRepositoryReader behaves correctly.

(cherry picked from commit 6f93511ef8531e5e390b359e6fbdd06eb658b233)
[git] IDEA-132552 Use THashSet instead of HashSet for VcsRefs to save some memory

(cherry picked from commit ad6c010beba81c5bf35b5ff97db2ef9b335efd55)
[git] IDEA-132229 Remove Hash<->String conversion to avoid extra HashImpl and String objects allocation

(cherry picked from commit adc560a854d5dabfe5736f4aa39ec5198443abc5)
[log] Don't log PCE

(cherry picked from commit 9ec2fa983af60e8b1b3a83e612570d3b706a5641)
[vcs] IDEA-132577 Save files before adding to VCS

(cherry picked from commit 726361a82f01fdba6db6ea3c7da3ea02958b7bb4)
[vcs] IDEA-87769 Don't report unimportant roots in notification

Even if there are other roots to report.
+ simplify the filtering code.

(cherry picked from commit 36fa0e8789c67399ad0fd3179bf1a5d626e4c9f3)
[log] IDEA-132229 Optimize HashImpl serialization

* Read/write bytes, don't convert from/to String.
* Introduce VcsLogHashMap versioning, cleanup previous version on start.

(cherry picked from commit 4e077068bf741707e35ccbf63c3cf1585f1b08ea)