Expose names of AST elements in Before hook (Legacy API)

This is to allow us to release Cucumber 1.3 and keep backwards compatability with
an undocumented but widely-used API.

It will be replaced by #430 when v2.0 is released.