Project.pm: validate new HEAD setting
Validate the new setting for HEAD. The new setting must be
a valid refs/heads/... item OR the same as the current HEAD
setting.
And while we're in there, if the current get_heads list
would be empty and a HEAD is currently defined, add that
to the list to avoid an empty popup.
With these changes the HEAD popup on the editproj.cgi
form should never be empty and it's no longer possible
to manually stuff a value in the form result to set
arbitrary refs/heads/... HEAD values.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>