Base64 encoder/decoder and tests

As described in the draft 21, section 2 of JWT, the Base64 string should
be safe and trailing = have to be omitted (http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-21#section-2).

This PR includes new functions to encode and decode according to this
draft.
hey @Spomky I guess this isnt used anywhere, shall we remove it?