Erlang term decoder/encoder

Encode Scala types into erlang and vice versa as closely as we can.
Merge pull request #1 from cloudant/encode-decode

Erlang term decoder/encoder