Project.pm: add some more "cursory" checks to set_HEAD
There are various restrictions on ref names in Git.
They are detailed in `git help check-ref-format`.
Previously single quote (') and angle brackets (<>) were
being disallowed. That is retained for now even though
technically those are NOT invalid ref name characters.
Add some more cursory checks for characters and sequences
that would cause Git to reject the ref name.
This still does not catch everything, but it catches a
lot more than it used to.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>