Use an actual std::mutex in Spawner

- Instead of the terribly unsafe and non-atomic at all bool-based horror
used before.