Remove search when clearing HTML panel search field (part of issue 6705)

https://code.google.com/p/fbug/issues/detail?id=6705
Reset HTML panel search when leaving edit mode (future proofing for issue 3189)