Use the new ast-types `visit` API instead of the deprecated `traverse`.

This makes `Rewriter` into a subclass of PathVisitor.