osd: allow pg log trim during (non-classic) scrub

Chunky (and deep) scrub do not care about PG log trimming.  Classic scrub
still does.

Deep scrub can take a long time, so not trimming the log during that period
may eat lots of RAM; avoid that!

Might fix: #4179
Signed-off-by: Sage Weil <sage@inktank.com>
osd: restructure calc_trim

No functional change, except that we log more debug, yay!

Signed-off-by: Sage Weil <sage@inktank.com>
osd: allow (some) log trim when degraded, but not during recovery

We allow some trim during degraded, although we keep more entries around to
improve our chances of a restarting OSD of doing log-based recovery.

Still disallow during recovery...

Signed-off-by: Sage Weil <sage@inktank.com>
osd: allow log trimming during recovery

We rely on min_last_complete_ondisk being accurate; as long as we have logs
from that point, the current replicas will be able to safely recovery via
their logs.  Bump the target size, just as we do with degraded.

Signed-off-by: Sage Weil <sage@inktank.com>