Adds an object to the object registry.
IceGrid gets the object type by calling ice_id on obj. The object must be reachable.
obj