Move parent_id calculation to the application scope
What does this MR do and why?
Contributes to #441465 (closed)
Problem
SHA1_EMPTY_TREE_ID
value is hardcoded and used in Gitaly client
scope. That prevents us from providing a different value for SHA256
repositories.
Solution
Pull commit id calculations to the higher scope (Repository, Commit)