osd: move pg log into leveldb

log from wip-pginfo
Fix bugs in PG::read_log() handling
Eliminate compiler warnings

Feature #4075: osd: move pg log into leveldb

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: David Zafman <david.zafman@inktank.com>
PG: write_log if we read an old-format log

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