Add failing test for issue gh-4728
Fix InputTransformer to strip Qt console continuation prompts.

Closes gh-4728

Thanks to the excellent detective work by @y-p, this was an easy fix.
Merge pull request #4730 from takluyver/i4728

Fix stripping continuation prompts when copying from Qt console