Refactor code to resolve jobs in WAIT_ASYNC into JQManagedJob. Add tests...

....