Remove global client rw lock

leap.mail is handling locks in a finer-grained way now,
so we do not need to block everything so much
add locks for create_doc and update_indexes. Closes: #5139

This solves a InterfaceError (sqlite error code 21)
we were having with massive concurrent creation/puts.
Set Write-Ahead Logging

with autocommit set to 50 pages, a value that will permit fast reads.
also set synchronous mode to normal on regular operation.
changes file
Merge remote-tracking branch 'refs/remotes/kali/feature/perf-tweaks' into develop