spi: initial implementation of SPI master.

This implements a SPI master, initially only in loopback mode where MOSI
is connected to MISO through an inverter to check that transmission
occurs.