Refactor cxx2js to use clang::Rewriter