Logout/Shutdown dialogs: Capture focus and keyboard input and block
until dialog is closed.

Fixes https://bugs.launchpad.net/linuxmint/+bug/1330188