Added public encode and decode methods

Third try on this one. Sorry I messed up the previous pull request.

Its a pull request for: https://github.com/mozilla/node-client-sessions/issues/21