Fix input transformer bug when pasting ipython promts.

Fixes a SyntaxError that arose when pasting code containing the IPython
continuation prompt without preceding spaces, eg.:

In [1]: if True:
...:     print "No spaces before the '...:' prompt."

This issue was brought up in
"http://stackoverflow.com/questions/26297356/how-can-i-paste-the-ipython-output-in-ipython#comment41270724_26297356"

This commit adds a test for the bug, and fixes the regular expression
that strips continuation prompts.
Fixed whitespace bug when pasting IPython continuation prompt.

Fixes a SyntaxError that arose when pasting code containing the IPython
continuation prompt without a trailing white space, such as:

In[1]: if True:
   ...:    print "No space after ':' on next line."
   ...:

This might arise if the user only copies up to the end of the last
prompt, without copying the trailing whitespace.

This commit adds a regression test and fixes the regular expression that
strips continuation prompts, making the whitespace optional.
Fixed error in comments of test for inputtransformer.

The second-to-last commit incorrectly referenced issue 6674 in a comment
to a unit test.
Merge pull request #7015 from pbugnion/master

Fix input transformer bug when pasting ipython promts (issue #6674).