Added some unit tests for thrift module.
Added support for TJSONProtocol.