truncate potentially long CompositeErrors

If you have a typo in a task on 100 engines, the local exception will be a bit ridiculous.

This defaults the truncation to 4 tracebacks (could be even fewer, or even one?),
and you can set the tb_limit attribute of CompositeError to adjust this.

Prompted by [this SO question](http://stackoverflow.com/questions/14635935/silence-or-condence-ipython-parallel-exceptions).
Use inputhook_wx2 on osx

Fixes #2762
factor valid cell index logic
refactor cellc
Updating notebook compat docs.
abstract, cleanup and document

Separate the methods that actually insert dom element for easier
testing.

Cleanup, and order methods more logically

add "docstring"
Removing old dev docs.  All of this has been moved to GH wiki.
Adding link from Sphinx dev docs to GH wiki Dev: Index.
simplify logic
remove unused/not working function
move CM IPython theme out of codemirror folder
fix qtconsole history logic for end-of-line

EndOfLine may or may not mean the end of a full line when the line is longer than the window.
This commit uses the same logic to check as the actual move, so it should be consistent.

closes #2943
wrong cursor
use istype instead of isinstance for canning tuples/lists

and add explicit support for namedtuples
test serializing lists / tuples / namedtuples
test namedtuple as return and apply arg
fix logic for append_javascript

PR #2911 results in appending javascript even if dynamic is false,
so in current master all javascript outputs are actually run at load.
Merge pull request #2954 from minrk/fixdynamic

fix logic for append_javascript
Merge pull request #2946 from minrk/qteol

fix qtconsole history logic for end-of-line
remove unused namedtuple import