Speed up git branches massively

This replaces the slower Ruby version of the script I borrowed from a
play-by-play or something a long time ago, with a pure shell script and
`git` based system using `git for-each-ref`.

The previous Ruby-based version took around 0.491s. The new version
generally takes about 0.030s.

As I run this command all the time that really adds up, especially in
larger repos.