Make the first branch pushed to an empty repository the default HEAD
In an empty repository, pushing a new branch not called "master" would leave HEAD in an unknown state, causing ambiguity if another branch were pushed. This could in turn cause a new protected branch to be created and cause the default branch to change.
- Closes #1561 (closed)
- Closes #1576 (closed)
- Closes https://github.com/gitlabhq/gitlabhq/issues/8883