Implement GetDefaultBranch in localrepo
This logic is required in a few different places and currently lives within the refs service code. To allow better code sharing the ref service code has been extracted.
Changes the default logic to remove most fallbacks. It now depends only on HEAD or finding main/master.
Edited by James Fargher