(#2631) - Start lock before reading current doc
Revert "(#2577) - add some attachments tests"

This reverts commit 9e5d826e65b361c907a6650e7eed9bc4dd6f049e.
Revert "Revert "(#2577) - add some attachments tests""

This reverts commit 458ccdcce3c1f2477815dbc73a1f56639133f485.
(#2644) - Make code indentation consistent across site
(#2639) - make sure we do no more writes after replication is over