model: Add a check() method to model objects
It calls attr.validate() (which calls the validators), and recomputes the hash of HashableObject instances.
A future commit will also make it check the raw_manifest attribute when relevant
Depends on !210 (closed).
Migrated from D6799 (view on Phabricator)