This implements threading of the pathfinder workers.
Details of the architecture:
- Workers are dispatched paths in a round-robin-ish fashion. It's naive, but it works well enough for now.
- Paths are then fetched in reverse order and messages are sent.
The Long pathfinder grid is owned by the pathfinder and so safe to use across turns. The obstructions manager' shapes aren't, so protected behind a mutex.
The two bits to comment on are mainly:
- Do you think the protection in ObstructionManager is sufficient?
- Do you find it OK to thread_local the pathfinders data?