added base64 encoder/decoder (moved in from gnet lib)