arch-atmega spi: use allocated buffers instead of static ones

Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
arch-atmega spi.c: fix disable / restore interrupts

Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
arch-atmega: all buffers involving usb-uart set to 64 bytes size

This patch fixes a freeze we are experiencing with some serial clients (e.g.
putty), due to the fact that __pipe_input_handle used to read only 20 chars at
each usb interrupt.

Buffers are now allocated with bathos_alloc_buffer, leading to less RAM usage.

This also affects shell.c, since it has a buffer of 30 bytes and needs to
read all 64 bytes if fast cut&paste is executed

Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
arch-atmega/spi.c: handle char 0 as 'end of enquiry' when polling is incoming

Signed-off-by: Aurelio Colosimo <aurelio@aureliocolosimo.it>
events: add function returning number of currently pending events
arch-atmega: add special functions for handling i2c signals (bitbang driver)
mcuio bitbang i2c: make it possible to override scl/sda related functions
mcuio bitbang i2c: don't go to idle while no pending events are there

This speeds up i2c transfers by avoiding useless idle loops (just go
on doing what we're doing until somebody really needs the cpu).
mcuio bitbang i2c: make it possible to override regular udelay()
arch-atmega: avoid udelay for i2c (no reliable udelay found for such short times)
mcuio_bitbang_i2c: greedy implementation

Always take all the time needed to complete an i2c transaction
(speed up i2c, slow down all the rest).