repository: Test refactorings and SHA256 object format support
This MR does some refactorings of CreateFork tests and enabled testing with the SHA256 object format. This is part of an effort to find the root cause of Flaky test: TestCreateFork_successful/secure (#4414 - closed).