Extract out parsing proto file logic from ProtobufGen

I don't think WIRE_COMPILER is defined yet.