Move fast-forward? logic from repo to git namespace

This is where the logic should be. Also, clean up tests and make the function
more flexible in terms of arguments it accepts.
Allow unwanted-branches to be specified with hashes

This makes it easy to re-use the same branch name later, without removing it
from unwanted-branches before creating it. This will be supported by the
hesobase, which will have a user interface that makes it easy to add unwanted
branch/hash pairs. Still supporting branch-name-only unwanted sets because these
are simple enough for many use cases and are easy to enter in manually when
using the legacy configuration file.