Аdded caching to typeahead component

Moved from https://github.com/twitter/bootstrap/pull/6465