Correcting dismissal of onBeforeUnload dialogs.

We now notify the button's immediate parent, instead of sending a message
to the button. Sending the BM_CLICK message to the button can fail if the
dialog doesn't have the system focus.