Restrict which refs can be the default branch

We currently consider anything to be capable of being the default branch, including notes. We should only let the default branch be a branch, i.e. a ref living in `refs/heads/`.

- [x] tests for the refspec setup for `--branch --single-branch`
- [x] tests for a non-branch with HEAD's commit
- [x] tests for a remote with detached HEAD