dfu/boot: double swap on interrupted revert bugfix adaptation
dfu/boot: double swap on interrupted revert bugfix adaptation

Mcuboot changed TLV in PR: Fix double swap on interrupted revert
(https://github.com/JuulLabs-OSS/mcuboot/pull/485)

Above bugfix changes a little way for upgrade request.

This path introduces re-formatted original mcuboot bootutil_misc.c
code as much as it was reasonable which includes the bugfix
adaptation and support for devices witch have bite erased sate different
than 1 as well.

Signed-off-by: Andrzej Puzdrowski <0222c24e1773dd88269ed0e559909ec9bea3604a@nordicsemi.no>

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