Added ParallelInvoke feature to spawn parallel processes

Adds mutex locking to thread spawn and join, and a new ParallelInvoke to call methods on Simulation objects in parallel.