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

AHLRAP-1070 Merging in work to date with PyDev 2.3.0 master

Initial F1 work.

Change-Id: I6530e3d3b074688235b7d9059d38358129f99f7d

AHLRAP-1070 Merging in John Nolan's changes to fix console buffering.

Change-Id: I5564e8689d5951bd2a2fe4a96c2ecb86d3b13232

AHLRAP-1371 AHLRAP-1366 Fixes to F1 Console submission

This is a squash of 5 commits.

This is a fix for AHLRAP-1373 'If you change the console too often, F1
stops working'. The problem was that the exec line in shell module would
raise an exception if an appropriate console was not available for
command submission. Once the module had the raised exception, I guess
eclipse doesn't reinitialise it again so one needs to restart PyDev to
get F1 functionality back.

I fixed this by merely using a try-except block to catch any exceptions.

AHLRAP-1371 AHLRAP-1366 Fixes to F1 Console submission

This patch carries a few changes:

- Fix for AHLRAP-1371: When the Scripting Console was visible, the code
submission would send the code to a view only window and this resulted
in an unhandled exception. This exception broke the script and it
wouldn't work again. The change I have made fixes this by handling the
exception; but also raising a console window so the code can be
submitted.

- Fix for AHLRAP-1366: When stepping through the code using F1, when the
user reaches the end of the file, we don't want to wrap around to the
beginning. It makes no sense to jump all the way back to the import
statements once the module is done running. This fix was done by
changing how the goto_next_line functions works. It now returns a
boolean for whether or not is actually moved to the next line.

- Changing some function names to use pythonic_naming_style rather than
javaNamingStyle.

- Some basic dead code removal.

- There is a lot of code that could be tidied up here, but I have
refrained from going carte blanche and renaming all functions which are
not called externally to have a _prefix; or removing comments and
replacing them with extensive docstrings. This module could use some
love.

Cosmetic changes.

- Renamed variables to reflect their privacy.

- Added some meagre documentation.

Removed re-raise which was incorrectly commited previously.

Protect from F1 submission when no Console is set.

James Blackburn found that when the Scripting Console is set
and a file is opened, and F1 is hit, an exception was thrown as
no Console was found. Unfortunately, the IConsoleView doesn't
appear to provide a way to find anything but the top of the
IConsole list; so I've just protected it now.

Also, to aid readability, I've inverted some if statements to
return and reduced the nesting level for _get_console_parts and
_show_console.

AHLRAP-1366 - Fixed the F1 loop around

This is a subsequent fix to the previous commit now using the
last_line calculated from the document.

AHLRAP-1366 - Do not iterate through file when no Console is available.

Change-Id: Ic190b8b51110fa764dbbcd7f32f4d9fc006e6f15

AHLRAP-1373 - Rejig the F1 console resolution using ConsoleManager

James Blackburn pointed me at the ConsoleManager for resolving the current console.
This simplified the code dramatically and made it more robust for corner cases.

AHLRAP-1375 Make F1 work with indented lines.

Change-Id: I67853956e57b32170ea1e7d0534bd762f5f01861

AHLRAP-1509 Handle block continuation ; else ; elif ; finally ; except

Change-Id: I2f0da9ae5943d962edbfe8614286bfb6e6ca5d4a

AHLRAP-2286 Incorrect behaviour when F1'ing a block of code

Use the IPytho Input Splitter to chop input, rather than hacky custom code.

Change-Id: Ic6ae39c91b8d96f3c56aa0e1821ecb2e7a75fd7c

Implement F1 block mode using F1 line-by-line mode, this way we'll have
consistent behaviour between the two modes.

Do nothing if the user does F1 on a comment
Merge branch 'f1_to_submit_editor_code_to_console' of https://github.com/ahlmss/Pydev into ahlmss-f1_to_submit_editor_code_to_console
Merge branch 'ahlmss-f1_to_submit_editor_code_to_console' into development
Also did a number of changes to make it faster to initialize.
Making the line-by-line send to console faster to initialize (defining actions only once and not importing things -- asking for clases explicitly).