model: use attrs_static to enforce type validation of model objects
This does add runtime validation, and provides type validation by default on swh.model entities.
Related to #2308 (closed).
Depends on !93 (closed).
Migrated from D2819 (view on Phabricator)