Handle spurious deadlocks properly
unit test for deadlock detection
Merge pull request #1421 from marcel-blonk/PLFM-2891

Handle spurious deadlocks properly
Merge branch 'develop' of https://github.com/Sage-Bionetworks/Synapse-Repository-Services into PLFM-516
PLFM-516