osd/: optionally track every pg ref

This involves three pieces:

For intrusive_ptr type references, we use TrackedIntPtr instead.  This
uses get_with_id and put_with_id to associate an id and backtrace with
each particular ref instance.

For refs taken via direct calls to get() and put(), get and put now
require a tag string.  The PG tracks individual ref counts for each tag
as well as the total.

Finally, PGs register/unregister themselves on construction/destruction
with OSDService.

As a result, on shutdown, we can check for live pgs and determine where
the references are held.

This behavior is compiled out by default, but can be included with the
--enable-pgrefdebugging flag.

Signed-off-by: Samuel Just <sam.just@inktank.com>
OpRequest: don't maintain history if the OSD is shutting down

Signed-off-by: Samuel Just <sam.just@inktank.com>
AsyncReserver: delete context in cancel_reservation

Fixes: #4662
Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: bail if deleting in _finish_recovery

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: check for pg change in ~FlushState

Fixes: #4662
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::_applied_recovered_object*: don't queue scrub if deleting

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::_finish_mark_all_unfound_lost: only requeue if !deleting

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