Add tests for create_identity + fixes
- Clean some now obsolete stubs from Permissions tests
- Use DbaTransaction for db transactions in QueueWorker
- Allow passing callable as array to hooks + add tests
- Add basic tests for create_identity function.
Of these the changes to QueueWorker is probably the most critical ones. The DbaTransaction stuff has been in use for quite a while in other parts of the code, though, so I think it should be safe.
The tests for create_identity depends on the QueuWorker changes, and the call_hooks fix. But otherwise these could have been submitted as separate patch sets. Lumping them together in order here for simplicity, although they may seem unrelated.