osd: separate cleanup from PGBackend::on_change()

The generic portion of on_change() cleaned up temporary on-disk objects
and requires a Transaction.  The rest is clearing out in-memory state and
does not.  Separate the two.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit e299357e2a24474ab7a02e65ca0279336fd04b76)
osd: clear PGBackend state on shutdown

This was leaking state on shutdown whenever there were in-flight repops
that were canceled.

Fixes: #7891
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit cafceae6c243369d3616af8217884e7e029896b9)
osd: s/applying repop/canceling repop/

The 'applying' language dates back to when we would wait for acks from
replicas before applying writes locally.  We don't do any of that any more;
now, this loop just cancels the repops with remove_repop() and some other
cleanup.

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ef40737eee4389faa7792661a0f9d15b3d0440f2)
osd: cancel agent_timer events on shutdown

We need to cancel all agent timer events on shutdown.  This also needs to
happen early so that any in-progress events will execute before we start
flushing and cleaning up PGs.

Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c0dc245b662f1f9c640d7dd15fdf4cf26e729782)

Conflicts:
	src/osd/OSD.cc