Changing process.nextTick to setImmediate

This fixes slowing down the eventloop under specific circumstances.
(no test cases yet, trying to implement a repeatable test)