Force term factory to be a singleton and implement map key serde classes for jackson