Backport PR #5605: Two cell toolbar fixes.

1. When a new notebook is loaded we should update the state of the ``select`` element listing the cell tollbar presets in the main toolbar, so that its value reflects the ``celltollbar`` metadata entry of the notebook.

2. When a new notebook without ``celltoolbar`` metadata entry is loaded we should make sure that the cell tollbars are hidden. In particular, that is needed when you are working to a notebook with a certain cell toolbar preset and then you revert the notebook to a state with no cell toolbars.
Backport PR #5826: allow notebook tour instantiation to fail

can fail with SecurityError, depending on browser privacy settings

disable UI Tour menu entry if tour instantiation fails

ref: sorich87/bootstrap-tour#262

closes #5703
Backport PR #5835: fix typo in v2 convert

resulted in NameError on orig_version because arg name is from_version
Backport PR #5841: Fix writing history with output to a file in Python 2

Closes gh-2412
Backport PR #5843: remove Firefox-specific CSS workaround

The bug being worked around appears to be fixed either in CodeMirror or Firefox (tested with FF 29).

Importantly, the workaround appears to *introduce* incorrect behavior

closes #5192
closes #5364
Backport PR #5845: Pass Windows interrupt event to kernels as an environment variable

This allows third party kernels to use our interrupt mechanism on Windows.

Closes gh-5840