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>
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>
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>
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>
Merge pull request #2085 from ceph/wip-7891

osd: fix pg ref leaks on shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>