Expose names of AST elements in Before hook

See https://github.com/vcr/vcr/issues/288 and #425.

We should make this part of the public API.