Added line number checking to backspace and delete keys.

Refs #7575
Merge remote-tracking branch 'origin/bugfix/7575_python_console_delete_uneditable_content'