IDEA-115906 Throwable ; IDEA-117401 IAE fixed

*update isFresh method for repository;
*hgVersion used for appropriate branchheads file detection;
*tests updated;
*additional checks inserted in HgRepositoryReader for migrating between hg versions
(cherry picked from commit 4cc3742)
Method name simplified
(cherry picked from commit 0924c2b)
Branch information checks moved to appropriated separated methods.
(cherry picked from commit 9492982)