Changed bootutil's order of events to verify the image header before checking the image.
Added the bootloader state object to the bootutil boot_is_header_valid() function