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.
Allow output prompt to leave out numbers for qtconsole
fix directory listing with broken symlinks

directory listing would 404 if any listed file doesn't exist
(e.g. symlink to missing target).

Previously-failing test included.
add secondary `debug` flag for heartbeats

in both KernelRestarter and parallel HeartMonitor

Since these both produce a huge amount of output,
they limit the usefulness of `--debug` output for debugging
other aspects of IPython.
test for overly greedy completion swallowing
fix for underscore completion
Make installation of native kernelspec explicit

Instead of creating a kernelspec directory matching the running
frontend, return its spec without writing to disk.

Adds a command 'ipython kernelspec install-self' to write a kernelspec
for the current version of Python.
Simplify kernel manager code
catch any exception while waiting to connect

requests 2.4 changed the exception type for a failed connection