DNM: OSD: introduce require_up_osd_peer() function for gating replica ops

This commit passes basic local smoke-testing, but needs to run through a suite before we merge it. Notice that, while it's nominally a bugfix, this PR is for master. I feel more comfortable with that arrangement given the kinds of errors it produces and the size of the fix.