Fast Lua base64 encoding/decoding with support for urlsafe variant