STM32L4: Fix sleep implementation
STM32L4: Fix sleep implementation

Correctly detect and handle the low power run mode when entering and exiting sleep mode.

The generic `hal_sleep` implementation tries to exit LPR mode always, resulting in a spin-loop during a critical section (disabled IRQ).
The new approach returns from LPR to Run mode if enabled (LPR bit set), enters sleep, and resets to the original state on wakeup (WFI).

c1728p9/mbed-os,kjbracey-arm/mbed,andcor02/mbed-os,kjbracey-arm/mbed,kjbracey-arm/mbed,mbedmicro/mbed,c1728p9/mbed-os,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,c1728p9/mbed-os,kjbracey-arm/mbed,andcor02/mbed-os,c1728p9/mbed-os,andcor02/mbed-os,andcor02/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os