stmhal: Fix USB CDC buffer overrun error.

Need to wait for the low-level USB driver to send the data over the USB
in-endpoint before the buffer can be used again.  This patch adds a
check for this.
stmhal: Add pyb.have_cdc function to check if USB CDC device is enabled.