Use memchr() instead of strchr() in _authorize().

Although base64_decode() adds a '\0' to the end of the decoded string,
memchr() is a tiny wee little bit faster as it doesn't need to look for
it in the string while scanning. And there's a length parameter, which
is nice as well.
Move enums used by STRING_SWITCH() to the functions they're needed.