Handle the new '(detached from <ref>)' output from newer `git branch`.
Also handle new `git branch` output in #all_branches.