chore(engine): add deadlock test

testcase verifying that the database is configured in a way that it
isolates readers from writers in the expected way.

related to #CAM-2120