Refactor to allow running outside of Android.
Pull over the Android impl of Base64 and revert to using it.