Revert "Revert "STM32: Use hardware CRC unit""

This reverts commit 58abbf7fc7686a16ee5bdfacb1241a5adf2921ea.
stm32f1/stm32f4: fix hardware CRC calculation

This was real-life tested on stm32f1 hardware including computation
for odd-sized ranges.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Make code compatible with newlib-nano and use it for stlink

With gcc-arm-none-eabi-4_7-2013q1-20130313 and -O2 I get
   text    data     bss     dec     hex filename
  45744     304    2376   48424    bd28 blackmagic

With -Os the results are even more impressive:
   text    data     bss     dec     hex filename
  37900     304    2376   40580    9e84 blackmagic

Since -Os might lower the debugging speed, do not enable it yet in the
absence of real measurements.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>