Allow mocking setImmediate with the timers API

This lets you mock setImmediate with the timers API (fixing #323).

I'll leave this as an initial implementation, and if you're happy to merge this I'll take a look at including clearImmediate too next.