Only resetMatches when showing matches.

Make the dismissClickHandler less aggressive by only resetting matches when matches are being shown. Use $apply insetad of $digest.