Fix 2 bugs.

First bug was that ids weren't being kept after the first
instrumentation, so if func had id 3, then if you'd instrument it again
that information wouldn't be retained.

Second bug was a long standing problem with setInterval, which was that
if you did setInterval(x, 500), x would be evaluated immediately rather
than every 500 ms - we need it to be re-evaluated every 500ms, because
we're going to replace it with FN_TABLE[x.id] and that could have been
udpated by this script. We could replace x with function() { return x; }
which would make it be re-evaluated every time, but the real reason this
is a problem is because we can't instrument the code of setInterval. To
fix this, I added a handcoded setInterval function to the test script.