Fix device erase which was not working in all bootloaders.
Some bootloaders return erase-in-progress status until the erase
is complete, so check for that message and use time-based loop.