ReplicatedPG: track temp collection contents, clear during on_change

We also assert in on_flushed() that the temp collection is actually
empty.

Signed-off-by: Samuel Just <sam.just@inktank.com>