refactor(typeahead): use `ng-if` and `track by` in template

Closes #1722