inject: Save a reference to setTimeout

In attempt to mitigate issues with setTimeout mocks, such as
provided by Sinon.JS.

Though usage of sinon should include teardown afterwards, the
inject hearbeat timeout might run when an asynchronous test
yields at which point it would get the wrong setTimeout.