Guard that performs a write lock on ctor and unlock on dtor. Use for scoping a write lock to get automatic unlocking.