Improve handling of dfu_state by moving more state changing towards the IRQ handler. Having both the main loop and IRQ changes dfu_state within the same state could lead to races.
The main loop is now only a simple worker which reports back via dfu_flash_done & dfu_flash_status.