Fix AuthTktCookieHelper so that it doesn't create bad cookies
The AuthTktCookieHelper when provided a type it didn't knoww what to do
with would simply pass it through unchanged, this would lead to things
like object() being serialised by just having str() called on it, which
may included spaces and other characters that are not allowed in cookie
values.
WebOb would send a RuntimeWarning:
RuntimeWarning: Cookie value contains invalid bytes: (b' '). Future
versions will raise ValueError upon encountering invalid bytes.
This fix warns the user of the library directly, and makes sure to
call str() on the provided userid, AND then encode it as base64. The
user won't get back the original object after decoding on a
request/response round-trip, but at least no cookies are being generated
that are invalid.