WL#4449: DDL locking: add unit tests

Affects: Benchmarks-3.0   —   Status: Un-Assigned   —   Priority: Medium

Add unit tests for metadata locking.
Test:
 - lock compatibility rules
 - multiple lock acquisition
 - lock conflicts