rwlock: add utility methods for RWLock::Context

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
objecter: simplify rwlock context checks

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
objecter: _op_submit() handles EAGAIN

promote the lock when getting EAGAIN in _op_submit(). Also move around
some code that changes op members so that we don't set it too early as
we might return with EAGAIN.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
objecter: _recalc_op_target() sets op->session in any case

There are a couple of cases where we aborted early without setting
op->session, in this case we need to set op->session to point at the
homeless session.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>