Adding support for dict_to_protobuf

 * Adds the reversing function.
 * Adds unit tests for both.

Thanks from Livefyre.