Generalized std::lock_guard for Lockables exploiting std::locks's deadlock avoidance algorithm.