JCR-3115: add test case for breaking and fixing version storage (also add hook for running consistency check in "fix" mode)