Enable F1 as a keystroke to submit editor code line-by-line to console

This is a feature we use at AHL to bind the F1 key to the action of pasting code line-by-line from the open editor to the interactive console.  This is useful for managing code in scratch files, testing parts of scripts, or making changes to code that can't be easily reloaded.

It handles Python block syntax, comments, triple-quoted strings, etc.  Empty lines and comments are suppressed to keep entry of functions etc. together.  Initial indentation is removed to allow you to paste nested functions.