Make acquireAll() and convertToWriting() sane

When there are pending writes, `acquireAll(_, owned > 0)` must fail
immediately, otherwise we will deadlock due to the pending write never
being able to acquire the resource owned by the other caller.  The bug
impacted the `convertToWriting()` API.