(bug 49583) refactoring term validation

Use ValueValidator and EntityValidator to validate terms and
enforce constraints on edit. Introduces TermValidatorFactory
for defining validators based on the entity type.

Change-Id: I3778f7b4d9a212e7c6a83b3b156da8c1b64ccdf0
Merge "(bug 49583) refactoring term validation"