Add 'on_demand' option to interact() so that long-running functions can be started only when explicitly requested
Disable run button until the function finishes
Add tests for the on_demand option
Update custom.js

Explain different semantics required for instances versus functions or classes. Based on comments of @minrk in #5985.
Implement atomic save

Ping @fperez, this should avoid issues with corrupted/lost notebooks
when the disk is full, though I haven't worked out how to test it just
yet.

Closes gh-6254
Rework atomic_writing with tests & docstring
Update custom.js
Add fsync() call in atomic_writing
Load rpy2.ipython for rmagic, print deprecation warning
Remove rmagic tests
Remove rmagic docs

Leaving intersphinx link to rpy2 docs.
No need to check for rpy2 in test machinery
Docs fixes for rmagic deprecation
Add URL to warning about rpy2
close websocket connections on ping/pong timeout

we recently added ws pings for keep alive,
and we can now use the longs to close dead connections.

This can apparently happen when connections are not closed cleanly,
e.g. on VPNs.

Setting ws_ping_timeout = 0 disables the ping mechanism altogether.
Add Math display support for qtconsole
Allow output prompt to leave out numbers for qtconsole
Initial messing around.

Latex tab completion will have to be done outside the normal
completer logic as the completer line splitting logic uses
\\ as a special character to split lines on. I probably want
to put the latex completions first and it if finds any matches,
don't do any other completion logic. The only issue is that might
short circuit dir/path matching on windows. Hmmm.
Merge master
Change from on_demand kwarg to interact_choose function