* Add a general purpose multi-threaded task manager (worker pool) for background tasks
Reimplemented screenshots off-loading using the new task manager.
* Largerly rewrite resource loading internals
They use the new task manager API now and should be generally more
robust.
* Made the game playable without threads again
* wait for resource async load task instead of intermediate state change
* remove dead code
* taskmgr: if creating a worker thread fails, try to make sure the others terminate
I would've preferred to just go with 4-spaces for indent and no tabs,
but lao is a bit conservative about it. :^)
Still, this is a ton better than mixing different styles all over the
place, especially within the same file.