Visitor: remove context and add lifetimes.

**NOTE**: temporarily rebased on top of #12809, do not merge yet.
Few visitors used the context passing feature and it can be easily emulated.
The added lifetime threading allows a visitor to keep safe references to AST
nodes it visits, making a non-owning ast_map design possible, for #13316.