cpu/stm32f1: spi_transfer_bytes proper counting.

The transferred bytes were being counted more than once because of a +=
when calling spi_transfer_byte().

This patch should also handle errors from spi_transfer_byte() better
since it is now possible to detect errors _after_ the first byte has
been successfully sent.

Signed-off-by: Joakim Gebart <joakim@gebart.se>
cpu/stm32f1: Reduce scope of ret variable in spi_transfer_bytes.

Reduced scope to inside the while loop as per comments in RIOT-OS/RIOT#1630

Signed-off-by: Joakim Gebart <joakim@gebart.se>
Merge pull request #1630 from gebart/stm32f1-spi-fix

cpu/stm32f1: spi_transfer_bytes proper counting.