Wip librados lock

A couple of changes aimed at librados contention reduction that I had in a branch and could go upstream.