commit: Implement SHA256 compatibility for ListLastCommitsForTree
This MR refactors tests of the ListLastCommitsForTree RPC to generate their test data at runtime. Furthermore, it removes the hardcoded dependence on the SHA1 object format in the implementation of the RPC so that it becomes compatible with the SHA256 object format.