esp8266/machine_uart: Implement uart.flush() and uart.txdone().

uart.flush()

flush() will wait until all characters but the last one have been sent.
It returns while the last character is sent. If needed, the calling
code has to add one character wait time. To avoid a permanent lock,
a timeout applies depending on the size of the FIFO and the baud rate.

ret = uart.txdone()

ret is True if no transfer is in progress. It returns already True when
the last byte of a transfer is sent.
ret is False otherwise.
diff --git a/ports/esp8266/uart.h b/ports/esp8266/uart.h
index de0919b..3c5592f 100644
--- a/ports/esp8266/uart.h
+++ b/ports/esp8266/uart.h
@@ -101,6 +101,7 @@
 int uart_rx_char(void);
 void uart_tx_one_char(uint8 uart, uint8 TxChar);
 void uart_flush(uint8 uart);
+int uart_txdone(uint8 uart);
 void uart_os_config(int uart);
 void uart_setup(uint8 uart);
 int uart0_get_rxbuf_len(void);