osd: fix state method whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
osd: handle race between osdmap and prepare_to_stop

If we get a MOSDMarkMeDown message and set service.state == STOPPING, we
kick the prepare_to_stop() thread.  Normally, it will wake up and then
set osd.state == STOPPING, and when we process the map message next we
will not warn.  However, if dispatch() takes the lock instead and processes
the map, it will fail the preparing_to_stop check and issue a spurious
warning.

Fix by checking for either preparing_to_stop or stopping.

Fixes: #8319
Backport: firefly, emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1798 from ceph/wip-8319

osd: fix race during shutdown

Reviewed-by: Samuel Just <sam.just@inktank.com>