Add ability to assert a lock is not held in DEBUG_LOCKORDER
Summary: This is an extract from Core PR10286
Test Plan:
make check
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1915