Use GCC atomic operations instead of IRQ disable.

Avoids unnecessary interrupt latency caused by irq disable.
GCC atomics map to LDREX/STREX that M4 in teensy3 supports.