osd: include peer_info in pg query

This can be very useful when diagnosing peering problems.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/PG: move some pg stat update into a helper

When we publish PG stats to the monitor, we fill in a bunch of fields
with information about degraded objects, scrub timestamps, and other
sundry.

Move this into a helper that we will re-use shortly.

Note that we do *not* move anything that is semantically related to
the stats being published (like the 'reported' field).

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: update pg stat fields when they are queried

When we query a PG, fill in (most of) the same fields that get
populated when the stats are reported to the mon.

Fixes: #6988
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #950 from ceph/wip-pg-stat

update pg stats when they are queried; share peer_info on query too

Reviewed-by: Loic Dachary <loic@dachary.org>