Factorise code in tooltip for julia monkeypatching
Partial fix to #3653 (from foo import <tab>)

Some configurability for Julia
(change the regexp because ! is a valid char in token from them)
set_next_input: squash multiple calls from the same cell execution

* When calling multiple times set_next_input in a single cell execution,
  we only keep the last input.

* Added generic support to PayloadManager for updating (instead of
  appending) payloads from a given 'source'.

Closes #1349
Fix style
payload.write_payload: use `single` keyword instead of `update`

* change default behavior when adding payloads to single=True
* document write_payload
PayloadManager: Fix docstring.
Add regression test for #1349
fix tooltip cancel

pending tooltip from open-parenthesis was not being cancelled properly
fix (CTRL-M -) shortcut for splitting cell in FF

fun-fact: Chromium uses a different keycode for hyphen/minus than does
Opera and Firefox.
Add test for IPython.utils.localinterfaces
Fix loading IP addresses from subprocess output
Merge pull request #4380 from takluyver/test-load-ips

Test and fixes for localinterfaces
Merge pull request #4379 from ivanov/split-shortcut-ff

fix (CTRL-M -) shortcut for splitting cell in FF
Use safe_hasattr in dir2

Add test cases

Move safe_hasattr to utils/dir2
fix menubar height measurement

we were measuring the wrong divs,
causing the pager splitter to occasionally be off-screen,
or the top ~8 pixels of the header to be cut off
(e.g. when visiting a url with an anchor).
Merge pull request #4382 from jtratner/safer-hasattr-in-dir2

Use safe_hasattr in dir2
Merge pull request #4363 from pablooliveira/set_next_input-reuses-cell

set_next_input: keep only last input when repeatedly called in a single cell

change applied in general to payloads
Merge pull request #4292 from Carreau/more-cpl

improve js-completer logic.
Merge pull request #4293 from Carreau/tooltip-mkp

Factorise code in tooltip for julia monkeypatching
Merge pull request #4377 from minrk/fix-cancel

fix tooltip cancel

pending tooltip from open-parenthesis was not being cancelled properly