Use require("ast-types").traverse.fast in getRequiredIDs.

This reduces the running time of `grunt populist:test` from 7s to 550ms
when running the tests for https://github.com/facebook/react.