Atomic test-and-set spinlock

Also updates spi_controller to use new spinlocks.