Repair stack upgrade with `stg branch --list`
When upgrading from an old version 4 stack metadata format, which uses
refs/heads/<branch>.stgit branches, to version 5 in the context of `stg
branch --list`, only the first branch in need of upgrade would be
upgraded and then the branch listing code would experience an error due
to trying to access the just-deleted <branch>.stgit reference.
We solve this problem by making `stg branch --list` filter old-style
<branch>.stgit branches.
Repairs #155
Signed-off-by: Peter Grayson <pete@jpgrayson.net>