SERVER-15187 Add OperationContext parameter to restoreState

Storage engines might need the current OperationContext to restore their
state.

For example, BDBRecordIterator needs access to the current underlying
transaction to recreate an underlying cursor. Having the BDBRecordIterator
save a pointer to the OperationContext it was created with won't work,
because the OperationContext is destroyed and a new one created between
saveState and restoreState.
SERVER-14668 Move lock acquisition further down in receivedInsert
SERVER-14668 Move top-level locks (Global and Commit) to the Lock Manager

o Adds the global and flush lock resources and begin/end transaction calls
to delimit where lock acquisition would start and end.

o Gets rid of the QLock and changes durability to use a single flush
thread, which is activated when commit is requested.
Revert "SERVER-14668 Move lock acquisition further down in receivedInsert"

This reverts commit 7233460d3b975b4804f7721ce81a92e91033219d.
SERVER-7596 Fix the replacement order of , and = in the SCRAM user name

If we replace , with =2C first and then replace = with =3D then , becomes =3D2C rather then staying =2C

Closes #772

Signed-off-by: Benety Goh <benety@mongodb.com>
Merge remote-tracking branch 'upstream/master'