Added a .toJson method to each protobuf message.

Enable this functionality with --generate_json_method. Without this option enabled, a dummy method will be generated.