Base64 encoder and decoder

UTF-8 correct, so accents, CJK and emoji survive the round trip

Encode text to base64 and decode it back, using UTF-8 bytes rather than the browser's btoa, which throws on some characters and quietly corrupts others. Standard and URL-safe alphabets, with a hex view when the bytes are not text.