This makes it easier to re-use readline.c and pyexec.c from stmhal in other ports.
Addresses issue #968.
Addresses issue #921.