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.

I do not have a board to test on so I would need someone else to verify that this is correct.
I think you can reduce the scope of `ret` while you're here.
I.e.: make the delacration local to the `while` loops.