HashableObject: Add type annotation for 'id' attribute
This class is a mixin that only works with classes that define this attribute, so it makes sense to declare it.
It also allows generic functions (that take a HashableObject parameter, such as swh-loader-git!72 (closed)) to access it without 'type: ignore'.
Migrated from D6282 (view on Phabricator)