Fix #353, handle server disconnects on client(mainapp).

When server disconnects, there will be a dialog prompting the user
about server has disconnected and asking to save the notebook
as a file on the client side. If user chose not to, the dialog is
dismissed and beaker starts hijacking keypress events to prompt the
same dialog again on such events. The dialog can also be opened by
clicking on the red 'offline' label on the nav bar.