mon: use the pending osdmap to avoid race

The following is racy:

    ceph osd crush rule create-simple ...
    ceph osd crush rule ls

because osd crush rule ls does not use the pending crushmap. If the
machine is fast enough the second command will run before paxos has time
to propose and incorrectly claim the rule does not exist.

The same applies to all getters relying on the content of the OSDMap.

Set newosdmap in OSDMonitor::preprocess_command to be the current osdmap
with pending changes applied. Replace uses of osdmap with newosdmap.

http://tracker.ceph.com/issues/9826 Fixes: #9826

Signed-off-by: Loic Dachary <loic-201408@dachary.org>