filestore, osd: Fixes to comform to programming guidelines

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Add OSD::make_infos_oid() as common function to create oid

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Create new static function PG::_write_info() for use by PG import

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Create static PG::_write_log() function

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Add flag to force version write in _write_info()

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Make clear_temp() public for use by remove

Signed-off-by: David Zafman <david.zafman@inktank.com>
tools/ceph-filestore-dump: Error messages lost because stderr is closed

Use cout instead of cerr for command errors
Use cerr for debug mode because stderr is avail
Output map_epoch in debug mode
Fix a message and only for debug mode

Signed-off-by: David Zafman <david.zafman@inktank.com>
tools/ceph-filestore-dump: Implement remove, export and import

Change local names to be clearer
Break real_log() into common function get_log()
Move infos_oid, biginfo_oid and log_oid to globals for general use

Feature: #4201 (osd: data loss: pg export/import/remove)

Signed-off-by: David Zafman <david.zafman@inktank.com>
Merge branch 'wip-4201' into next

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