Tweak phpunit.xml config to speed up tests and be prettier.
Refactor code to resolve jobs in WAIT_ASYNC into JQManagedJob. Add tests.