Introduce reportChanged API to keep state about whether a visitor changed the AST

* reportChanged is both methods on the context and the visitor.
* the user calls the context method and the context method calls the visitor method.
* this is optional so the API names tries to reflect this: e.g. `wasChangeReported()` instead of `isChanged()`