A scopelevel Lock class. Automatically acquires the lock when created and releases it when destroyed.