qtconsole: strip newline on text copy (fixes #6234)

IPython's inputsplitter inserts newline at the end of string passed to
it. So, if user didn't select newline before copying, we must strip it.
Fix grammar in comment
Merge pull request #6651 from JIghtuse/strip_newline

qtconsole: strip newline on text copy (fixes #6234)