Split off term deserialization code to TermDeserializer

This also includes a prototype of the new term model