feat search-filter: better click handlers

The click handlers were created with the component creation. Thus, the click "outside"
the element was detected event though the search field was not active.
This commit create the click handlers when the search field is opening, and delete them
when the search field is closing. It fix the memory leaks and optimizes performances.