Add a post-validator to allow individual object to validate themselves

In addition to supporting validation of properties and types, this new
validator can be used when the Template is finalized (in to_json()) to
verify things like mutual exclusion of properties.