timer/JS: Refactor to use inline function
timer/JS: Refactor to use inline function

After debugging this a lot, I found out unfortunately, that curried
functions are subject to GC and we really want the GC to introduce as
few pauses as possible.

I haven't found a better way to write the function (real_loop) in a more
Haxe-like way, so I'm using inline JavaScript here instead.

Signed-off-by: aszlig <ee1aa092358634f9c53f01b5a783726c9e21b35a@redmoonstudios.org>

aszlig/hase