PGMap,PGMonitor: maintain mapping of osd to recent stat epoch

Also, osd_stat will be empty for out osd.

When an osd is marked out, rather than remove it from osd_stat,
we instead 0 out the structure.

This patch also makes osd_stat_updates and osd_stat_rm private.
This should make it simpler to enforce invariants on these
mappings.

Each up osd will have a mapping since out osds are now included as
empty stats.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGMap: calc_min_last_epoch_clean() will now also use osd_epochs

We don't want to trim past the current osd map for any up osd.
osd_epochs provides a lower bound for that epoch for each osd.

Fixes: 5869
Signed-off-by: Samuel Just <sam.just@inktank.com>
common/hobject: add is_degenerate method

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: don't rescan the local collection if we can avoid it

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGBackend,ReplicatedBackend: add interfaces for scanning the pg

This will be important since the erasure coded pg will have a different
on-disk format than the replicated backend.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG.cc: remove leading empty space

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG,ReplicatedPG: expose PGBackend to PG

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG,PG: adapt collection_list* users to PGBackend interface

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG,PG: use PGBackend methods for getattr

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: add debugging in recover_replicas for objects added for backfill

Signed-off-by: Samuel Just <sam.just@inktank.com>
FileStore: make _setattrs not return -ENOENT most of the time

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: on split, leave log head alone

This way last_update doesn't go backwards.

Fixes: 6447
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: lock snapdir obc during write

Otherwise, we won't block properly in prep_push_backfill_object.

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