refactor(typeahead): move ngOptions handling to $typeahead factory