Support typeahead on composite elements

Some directives wrap input elements. These changes lets the directive dig into the DOM and work on a nested input field.
I would put some parens here to make the precedence more clear:
```javascript
inputEl = (inputEl && angular.element(inputEl)) || element;
```