Use default OS shell to run system commands

Instead of using os.system which uses /bin/sh, this uses subprocess.call (the replacement of os.system) to run the command using the default shell of the OS. With this, one can use more advanced commands for bash, zsh, ksh, ...

I do not have a win32 system to test this modification, so maybe line 2236 can also be changed like 2239.
Use default OS shell to run system commands

Instead of using os.system which uses /bin/sh, this uses subprocess.call (the replacement of os.system) to run the command using the default shell of the OS. With this, one can use more advanced commands for bash, zsh, ksh, ...

I also edited the docstring, added comments and fixed the handling of return codes.
Unify exit status from system_raw and system_piped
Add test for exit status from system_piped
Test process exit codes with terminating signal
change default timeout to 10s from infinite in parallel tests

avoids hangs with apply_sync in tests
adjust Scheduler timeout logic

Timeout starts when task submission is attempted.
That is, it starts *each time* in resubmit / retry cases.

Avoids issues of timeout firing only once while a task is pending,
when it might come back and be retried after the timeout has fired.
test very short timeouts

which should be guaranteed to fire while the task is pending
set minimum engines in a few tests
add js_extensions_path

serves files in `IPYTHONDIR/js_extensions` at `/js_extensions`.

This is a location for users / devs to drop-in frontend customization as js modules, css, etc.

The model is very much like the extensions dir (hence the name) - it's a location made available, but not loaded by default. You can load things from there with require, etc.

It's a configurable search path, just like static. This way we can define a system-wide location at a later point (/usr/share/ipython/js_extensions?) and still have user installs.
s/js_extensions/nb_extensions
install offline mathjax to nb_extensions instead of profile
serve local mathjax from nb_extensions
s/nb_extensions/nbextensions
alternate interpretation of mathjax install dir

parent, instead of full path
create static/custom in skeleton profiles
create [nb]extensions dirs in skeleton IPYTHONDIR
update IPYTHONDIR readme

it wasn't accurate
Merge pull request #4270 from minrk/task-timeout

adjust Scheduler timeout logic

Timeout starts when task submission is attempted. That is, it starts each time in resubmit / retry cases.

Avoids issues of timeout firing only once while a task is pending, when it might come back and be retried after the timeout has fired.

Also adds a ten second timeout for sync calls in the tests, which should hopefully avoid hangs when things are misbehaving.

closes #3210
don't require tornado 3 in `--post serve`

tornado.log is new in 3.0