search's cleared event is fired when field is empty #931

- added an option to clear when input is empty (by default set to false)
- worked with the search / close icon to make more sense
- When already searched a value the icon turns to a x. The change i implemented is if the input value changes the icon turns back to a search icon. Before it would stay an x and would have to click enter to search a different value.