JavaScript code rewriter for taming async-callback-style code