LSP has asynchronous semantics, being able to block on an async operation
completing is unneccesary and leads to tighter coupling with the threading.
In practice only tests depend on this, so we add a general-purpose "block until
idle" function to the scheduler which will work for all operations.
To get this working, fix a latent condition-variable bug in ASTWorker, and make
AsyncTaskRunner const-correct.
Change to notify_all()? Otherwise we might wake up some thread waiting on blockUntilIdle(), but not the worker thread.