Validate a reference name running all the tests in the book. This disallows lower-case references like lower, but also allows
ones like HEAD, and refs/lower.
Validate a partial reference name. As it is assumed to be partial, names like some-name is allowed
even though these would be disallowed with when using name().
The infallible version of name_partial() which instead of failing, alters path and returns it to be a valid
partial name, which would also pass name_partial().