Allow GC lock SharedGuard to be locked and unlocked independently of obj...

...ect creation or destruction (PLAT-554)

This makes the semantics like a std::unique_lock, which has RAII semantics but can also be
used more flexibly. Avoids the need to use a unique_ptr when more flexible locking is required.