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
Adding citation support.
FIX, coalescestreams incorrect nesting.
Adding better logic to the PDF postprocessor.
Adding docs about latex citations.
Fixing review comments:

* Don't use lstrip/rstrip in that way.
* Renaming things in the pdf postprocessor.
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
Addressing review comments.

* Rename parse_citation to citation2latex.
* Add <p> block to test markdown.
Fixing docstring.
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