verify_refname_available(): report errors via a "struct strbuf *err"