Stop UART threads reliably.
Make UART code pass flake8.
Updated UART example.