Fix UART bug causing hang on echo test
Fix UART bug causing hang on echo test

When the mbed-os echo test runs it causes DAPLink to stop transmitting
characters to the device.  The echo test sends a string to the device,
reads the same string back and then repeats this sequence.   With
optimizations in mbed-host-tests version 0.2.15 the repeat happens much
faster, revealing this issue.

This problem occurs because tx_in_progress is set to 1 in the middle
of a a call to uart_write_data when UART1_RX_TX_IRQHandler is
processing a UART RX interrupt.  Because this flag is set, the
function uart_write_data does not enable the transmitter interrupt
as it should.  This causes DAPLink to stop sending characters.

This patch fixes this problem by checking that the write_buffer has
data to send and enabling the transmitter interrupt in a critical
section.  It also prevents interrupts that aren't enabled from
being processed to further avoid any race conditions.  Finally,
it removes tx_in_progress since this flag is no longer necessary.

google/DAPLink-port,google/DAPLink-port,sg-/DAPLink,sg-/DAPLink,google/DAPLink-port,sg-/DAPLink,google/DAPLink-port