Switch from using promises for concurrency to a task pool

This saves a good deal of overhead in the hot loop.