[Benchmark] Synchronize with current benchmarking framework version.
[Bug Fix] Replaced accidentally left writer lock by the reader one.
[Aux] Helper locking function added and used.
[Bug Fix] Logger object now get locked while swapping.

Added helper function that creates lock guard on multiple mutexes using a deadlock avoidance algorithm to avoid deadlock.