test: don't use setImmediate in tests

Unless it's necessary, don't use 0.8+ idioms so the test suite can be
run under 0.6.x.