Fix detection for locking commands.
Fix detection for locking commands.

The lock_queue can now come in implicitly during a with
statement, so base detection on subclasses of LockKey
instead.

stdweird/aquilon,quattor/aquilon,guillaume-philippon/aquilon,quattor/aquilon,quattor/aquilon,guillaume-philippon/aquilon,stdweird/aquilon,stdweird/aquilon,guillaume-philippon/aquilon