Merge pull request #86 from bgamari/circular-stdio

Circular stdio buffer
spiflash: first version
toolchain: add simple SPI flash access library
lib/spiflash: fail on SPI transfer in progress; return JEDEC ID instead of 0/1
lib/spiflash: allow queuing using multiple contexts
lib/spiflash: fix program/erase bug causing wrong callback data to be used
lib/spiflash: fix callback parameter in spiflash_read_page
lib/spiflash: clean-ups
spiflash: Separate transaction state from device

Previously no attempt was made to serialize multiple transactions. This
meant that a long-lived transaction (e.g. a write) followed by another
transaction would result in the latter being dropped as it would be
dispatched while the BUSY flag is asserted. Here we queue multiple
transactions, ensuring that none is dispatched while the BUSY flag is
set.
Allow spiflash modules on other chip selects
spiflash: Track transaction state