Fix worker race condition in main loop

There is a race condition in the main loop where a job finishes after
`update` is called but before `worker_has_job` is called. For example:
`:load` in the playlist view sometimes leaves the user with an empty
playlist.

This can be fixed by calling `worker_has_job` before `update` but then the
user has to wait up to 250ms for the results to show up. Instead we add a
new function `ui_curses_notify` that can be called any time and causes the
main loop to wake up. This function is called in `free_add_job`.