Clear state before actual flash

Somewhere in the last few commits this got lost. This causes the state
to remain "update available" after flashing a new update, and you would
go into a flash loop, flashing the same ROM over and over (unless you
notice there should only be one nightly per day... :))