Make the "X" button on dialogs work.

Prior to this, the dialog was hidden but never actually destroyed.

Make the same changes to the service results deletion dialog.