storage/stream/flash: flash_sync: Check if there is anything to write
storage/stream/flash: flash_sync: Check if there is anything to write

The commit moves block that checks if flash_stream_ctx.buf_bytes
is non-zero out of CONFIG_STREAM_FLASH_ERASE specific code,  as that is
universal check and is valid also for not CONFIG_STREAM_FLASH_ERASE
code.

Signed-off-by: Dominik Ermel <1a1d45a9cc0c98a37f8d0a0d2dbe3cacc0b2344f@nordicsemi.no>

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