SERVER-14668: Replace uses of DBWrite lock with DBLock

This reverts commit 8e83e72512fcb8eb8f06987927766c0b77cea23e.

This reinstates commit ae333bc94a7d89d3220dcae9579fcaf68aa2e290
and commit 962f959a09b63aa0482d7e0c9bad89363d1e1194, and fixes
three cases where the wrong database name was locked.