only strip continuation prompts if regular prompts seen first

should be discussed before merge (ping @takluyver),
as it is a significant and sensitive change.

I'm also not sure that it's the right fix, but worth a try.

closes #4059
FIX, coalescestreams incorrect nesting.
move `--profile-dir` alias to base IPython app

allows specifying exact path to profile directory,
rather than just the name.
remember argv used to initialize an Application

store a copy so it can't be manipulated
pass profile-dir instead of profile to Kernel

avoids relative path issues for local profiles
when the notebook server starts in a different directory
from the kernels.
Added test
adjust strip_prompts logic a bit further

- initial-only prompt is only stripped from the first line (only change from master)
- any prompt is stripped from the second line
- if a prompt is found in the first two lines,
  strip from the rest of the block
support `input` in Python 2 kernels

input is just `eval(raw_input(…))`

closes #3990
update raw_input in example notebook
test input / raw_input

in the kernel
update tox.ini

drop Python 3.2, add [all] dependencies and run all tests
Fixed name error bug in function safe_unicode in module py3compat.
Merge pull request #4132 from rossant/py3compat-bug-fix

Fixed name error bug in function safe_unicode in module py3compat.
Merge pull request #4060 from minrk/multiprompt

only strip continuation prompts if regular prompts seen first
Restore autorestore option for storemagic.

It is now StoreMagics.autorestore rather than StoreMagic.autorestore
(note the extra s).

Closes gh-4078
Add test for StoreMagics.autorestore option
Merge pull request #4088 from jdfreder/coalfix

nbconvert: Fix coalescestreams line with incorrect nesting causing strange behavior

closes #4015
Merge pull request #4120 from minrk/input-py2

support `input` in Python 2 kernels
add files with a separate `add` call in backport_pr

`git commit [filename]` will fail if the filename is not already tracked.

/cc @ivanov
use check_call for git add and commit

in backport_pr