Decode a base64-encoded string. This function is lenient in
following the specification from RFC 4648,
http://www.apps.ietf.org/rfc/rfc4648.html, and will not generate
parse errors no matter how poor its input.