recovery: try to write EMMC partitions more reliably

Nexus 4 has flash errors that manifest during large writes (eg, of the
radio partition).  Writes of some blocks seem to be dropped silently,
without any errors being returned to the user level.

Make two changes to the partition-writing code:

- break it up into 1MB writes instead of writing partitions with a
  single fwrite() call.  Pause for 50ms in between every chunk.

- read the partition back after writing and verify that we read what
  we wrote.  Drop caches before reading so we (hopefully) are reading
  off the actual flash and not some cache.

Neither of these should be necessary.

Bug: 9602014

Change-Id: Ice2e24dd4c11f1a57968277b5eb1468c772f6f63
2 files changed