esp8266: Switch back to accumulating input data via ring buffer.

But now it's generic ring buffer implemented via ringbuf.h, and is intended
for any type of input, including dupterm's, not just UART. The general
process work like this: an interrupt-driven input source puts data into
input_buf, and then signals new data available via call to
mp_hal_signal_input().
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c
index 3681a02..c8a88c7 100644
--- a/esp8266/esp_mphal.c
+++ b/esp8266/esp_mphal.c
@@ -39,6 +39,8 @@
 extern void wdt_feed(void);
 extern void ets_delay_us();
 
+STATIC byte input_buf_array[256];
+ringbuf_t input_buf = {input_buf_array, sizeof(input_buf_array)};
 void mp_hal_debug_tx_strn_cooked(void *env, const char *str, uint32_t len);
 const mp_print_t mp_debug_print = {NULL, mp_hal_debug_tx_strn_cooked};
 
@@ -151,3 +153,7 @@
     nlr_raise(mp_obj_new_exception_msg(&mp_type_AssertionError,
         "C-level assert"));
 }
+
+void mp_hal_signal_input(void) {
+    system_os_post(UART_TASK_ID, 0, 0);
+}