drivers: flash: flash_stm32g4x.c: rework flash_stm32_block_erase_loop
drivers: flash: flash_stm32g4x.c: rework flash_stm32_block_erase_loop

Remove hardcode bank1 page limit (128) which is not always valid
(not valid for soc stm32g474rct)
Manage bank1/2 discontinuity when flash is Dualbank and
flash size is lower than 512K.

Signed-off-by: Alexandre Bourdiol <c23cc711c078d3e6bb50b3dc45a1b8842691e59a@st.com>

finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr,Vudentz/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr,galak/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,nashif/zephyr,Vudentz/zephyr,finikorg/zephyr,nashif/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr