made circular buffer thread save

this changes have to be ported also to the freescale variant.
the usb stack is not thread save. We disable the interrupts now to have a quick fix. But this needs to be solved properly by the mbed team in all targets!!
only read avail