recovery: write partitions more conservatively

Write and verify partitions using write(2) and read(2) rather than the
stdio functions.  Read and write in 4kb blocks.  When writing, fsync()
every 1MB.

Bug: 9602014
Change-Id: Ie98ce38e857786fc0f4ebf36bb5ffc93b41bc96f
1 file changed