[git log] make sure that readBranches reads actual information
[git/hg] While reading .git/refs don't put fake hashes in case of error

* Skip them and log error.
* Make RepoStateException checked, to make sure the logic is handled in
  all necessary cases.
* Keep unchecked exception (use IllegalStateException) if a critical
  error happens during repository initialization
  (e.g. .git/HEAD is missing).
* Remove GitTestRepositoryManager since overriding update() is not
  needed anymore (it doesn't throw the exception anymore).
  It automatically fixes IDEA-132298.