stmhal: On soft reset, if in raw REPL mode, don't run main.py.
tools: Improve reading back from pyboard.
tests: Allow to run tests on pyboard.

To run the tests on the pyboard you need to set the "test_on_pyboard"
variable to "True", and also have tools/pyboard.py available for import
(easiest is to symlink to it).