(WIP) Collab

Opening this pull request as WIP to get feedback and more eyes on it. It is not ready for proper merge, but a few commits might be worth cherry-picking early, such as the Typeclass-aware QuerySets, and the ability to check different lock types from one lock string. Just let me know if you're going to do that so I can handle any rebasing/commit fiddling accordingly on my end.
I would think "wizh", "immh" and "usrh" should OK abbreviations for the special cases of these handlers. If one wanted to make it pythonic one could even consider something like "_wiz", "_imm", "_usr" but that looks rather ugly to write. :)