Blank the reference and media search queries when closing dialogs

Bug: 61959
Change-Id: I45e161d322d4fb0a63d35c1a75a2a39ba9f73def
Merge "Blank the reference and media search queries when closing dialogs"