dump_stuck: fix race with osd start

Occasionally we don't wait long enough for the osd to start and
mark itself up.  Keep trying until flush succeeds.

Fixes: #5431
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #16 from ceph/wip-5431

Reviewed-by: Warren Usui <warren.usui@inktank.com>