Custom encodings

Adds support for custom encodings.

Just pass in an object with `{encode: function, decode: function, buffer: boolean}`
instead of a string encoding type, for `keyEncoding`, `valueEncoding` or `encoding` options.

So, this could probably be cleaned up, to use more abstraction - like: `var key =this.toKey(key_)`
but I did it this way, because was simplest to make smallest change to the current code.

closes #51