Merge pull request #241 from yjbanov/marshaller-opt

Organize generator code into libraries to support experimentation with custom marshallers
Fix a discovery generation bug where fields that are types with illegal class names cause broken generated code.
moved common emitter methods into EmitterBase; defined EmitterContext and MarshallerEmitter interfaces
split JSON marshaller codegen from Protobuf; remove unnecessary marshallers in the JSON version