Several fixes

Example lua file now handles a whole login process and stores state for
each client.

Added GA to constants.

Refactored client disconnection to not break the main loop when done
from Lua.

Fixed an issue where MCCP connections weren't flushing.

Changed sha1 function to return a base64 encoded string of the hash
because for some reason getting it to return the toHexString was
impossible.

Fixed keyval_get's sqlite query.