Store replication metadata.

This stores the t of the last-replicated transaction in a special entity
in the destination database. This allows us to restart from the right
place.