fix qtconsole history logic for end-of-line

EndOfLine may or may not mean the end of a full line when the line is longer
than the window. This commit uses the same logic to check as the actual move,
so it should be consistent.

closes #2943