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) to access it without 'type: ignore'.