Added tests.
Big fix in the parallel scheduler.

This bug allowed out of order (more than fuzzyness) execution of
events. It could thus cause the simulation to suddenly "jump
ahead".