fix(typeahead): correctly close popup on match selection
feat(typeahead): support custom templates for matched items

Closes #182