Add mechanism for objects to get a persistent ID.

If we move objects about over time, the object address is not a safe
value to use as for ObjAt. Add a mechanism for objects to get an ID
that lasts a lifetime. If the object is already in gen2, we use the
memory address as before. If not, we pre-allocate a gen2 slot for it
and use that.