Leverage luasocket for base64 encoding

luasocket is already a dependency of lua-websockets so its base64
encoding routine can be used instead of the hand-crafted one:

http://w3.impa.br/~diego/software/luasocket/mime.html#b64