mon/OSDMonitor: fix pool deletion races

Unify the pool deletion safety checks into a single set of functions. Make
sure we check the committed state and error out if there is a problem. Also
check the pending state, if any, and delay+retry if there is a problem there.

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