Split up NbtSerializationGen into modular code-emitter and compiler parts, to allow reusing code between serializer and deserializer generators.