[NUCLEO_L152RE/F103RB] Add automatic HSE/HSI clock configuration.

Update also SPI prescaler and use mbed_sdk_init() function.
Tested OK on the 3 different clock configurations: External 8MHz clock, External 8MHz xtal and HSI clock.