pyexec: Add event-driven variant pyexec_friendly_repl().

pyexec_friendly_repl_process_char() and friends, useful for ports which
integrate into existing cooperative multitasking system.

Unlike readline() refactor before, this was implemented in less formal,
trial&error process, minor functionality regressions are still known
(like soft&hard reset support). So, original loop-based pyexec_friendly_repl()
is left intact, specific implementation selectable by config setting.
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 5718ffa..eb39d54 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -235,6 +235,11 @@
 #define MICROPY_HELPER_REPL (0)
 #endif
 
+// Whether port requires event-driven REPL functions
+#ifndef MICROPY_REPL_EVENT_DRIVEN
+#define MICROPY_REPL_EVENT_DRIVEN (0)
+#endif
+
 // Whether to include lexer helper function for unix
 #ifndef MICROPY_HELPER_LEXER_UNIX
 #define MICROPY_HELPER_LEXER_UNIX (0)