Fix race condition in USB CDC transmit

This patch fixes a race that can cause data corruption/loss when sending data over the USB CDC serial port.  Exact details in commit message.

The window for the race condition is quite small, and the CDC code very slow (byte writes), so the hardware double buffering means this occurs extremely rarely for most sketches.

I have however seen it occur in real life.