write_flash: use calloc instead of malloc

calloc make sure memory is zeroed
write_flash: removed stupid comments
write_flash: fail whole flash when a flash read fails
add verify_flash - a simple function to verify flash regions
add read_flash - a simple function to read flash regions into a file