Fix fetching repo's branches when in detached HEAD state

Currently, gitter includes a bogus branch named '(nobranch)' in this case.

This PR fixes that up.

Implemented as support for a fix to GitList.