Rewrite a JavaScript AST to convert simple tail-recursive functions to while loops.