Set the change flag when assigning sequence/random in model/object.

Otherwise, modified sequence and random seeds won't be marked as changed
after replicating in and then won't replicate out.
Retain the listener ID when adding listeners during replication.