MDL-43885 Javascript: Make the [X] button work like 'No' in relevant dialogues

The [X] button on the dialogue is another form of the 'No' button and
should behave as such. In some dialogues this matters more than others
because the dialogue is destroyed.