SERVER-15921 Check for lock state in kv catalog

Check if we have a lock state before taking any locks in the kv catalog.
The assumption is that no lock state means we are in an inherently
single-threaded code block (like startup).

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Closes #855
Merge remote-tracking branch 'upstream/master'