XEP-0198: Use our own {encode,decode}_base64

THIS COMMIT IS MEANT TO BE SQUASHED INTO A PREVIOUS ONE WHEN THE HISTORY
OF THIS FEATURE BRANCH IS REWRITTEN.