Implement types.visit as an alternative to types.traverse

This work began over in the `recast` repository (see https://github.com/benjamn/recast/pull/99), but ultimately it made more sense to implement here, since I want to deprecate `types.traverse` eventually, and I don't want to add `recast` as a dependency of `ast-types`.