Pathfinding dispatch improvements

This simplifies the logic that decides whether to update a particular pathfinding request by replacing complex atomic operations with a simple lock. The primary change is to prevent both pathfinding threads from trying to update the same pathfinding request at the same time.