mgr/DaemonServer: prevent pgp_num reductions from outpacing pg_num merges
If we are merging lots of pgs down to a much smaller number of pgs, and
the pgs are able to move quickly (faster than the merges happen), we can
end up with too many pgs on a small number of osds, triggering the max
pgs per osd limits.
Avoid this by preventing the pgp_num reductions from getting too far
out in front of the merges themselves. Basically, cap the delta between
pgp_num and pg_num to the max_misplaced ratio. We are already limiting
the movement caused by pgp_num by max_misplaced; this effectively just
makes sure that the actual merging (and pg_num reductions) are keeping
up.
Fixes: http://tracker.ceph.com/issues/38786 Signed-off-by: Sage Weil <sage@redhat.com>