Update the HashableObject interface to take the object itself
This will enable a gradual enhancement of the functions in identifiers.py to take model objects directly, and return the bytes of the hash instead of an hex representation.
Related to T2703 Related to T2704 Related to #2713
Test Plan
no changes to tox tests
Migrated from D4307 (view on Phabricator)