Add object flags.

Adds new bitset field on `CountedObject` class which can be used to
store information about various object states.