DBObjectMap, hobject: move hobject->str methods to hobject

Signed-off-by: Samuel Just <sam.just@inktank.com>
common/shared_ptr.hpp: add get_next and expose VPtr and WeakVPtr types

Signed-off-by: Samuel Just <sam.just@inktank.com>
common/: add map_cacher

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: add SnapMapper

Signed-off-by: Samuel Just <sam.just@inktank.com>
test/: add tests for map_cacher

Signed-off-by: Samuel Just <sam.just@inktank.com>
SnapMapper: add adapter for ObjectStore

Signed-off-by: Samuel Just <sam.just@inktank.com>
Makefile: add SnapMapper to osd

Signed-off-by: Samuel Just <sam.just@inktank.com>
SnapMapper: add remove_oid and get_snaps

Signed-off-by: Samuel Just <sam.just@inktank.com>
test_snap_mapper: add tests for remove_oid and check_oid

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: Integrate SnapMapper with OSD

- SnapTrimmer now uses SnapMapper to get the next object to trim
- Entries for a snap are implicitely removed from SnapMapper when
the last object is trimmed, so no need for the adjust_local_snaps
logic.
- Scrub now compares the object_info snaps set on the object attr
with the version stored in the SnapMapper.

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD,PG: create and remove the snap mapper object

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: stop trimming when we run out of snaps!

Signed-off-by: Samuel Just <sam.just@inktank.com>
Context.h: adjust both finish_contexts versions

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG::proc_primary_info: snaps which are fully purged should return -ENOENT

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD::DeletingState: no need to lock in destructor

No other references can exist at this point.  Also,
it's not safe to hold the lock while calling the
Contexts in the list -- any of those might take a
different lock.

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: do comparison in proc_primary_info the right way round

Signed-off-by: Samuel Just <sam.just@inktank.com>
HashIndex,hobject: move logic for matching objects against hash mask into hobject.h

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: add split support to SnapMapper

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