rwlock: check lock return code

assert if not successful.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
objecter: don't call _recalc_op_target et al under session lock

In _scan_requests() we used to call _recalc_op_target() and other
similar functions having the session lock held. This is forbidden these
functions might try to retake it, and also might try to grab a different
session's lock which will introduce deadlocks.

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