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.
We should probably only search for a child input element if the element is not already an input.