recovery: preserve recovery logs across cache wipes

When doing a cache wipe or a factory reset (which includes a cache
wipe), save any last* log files in the /cache/recovery directory and
write them back after reformatting the partition, so that wiping data
doesn't lose useful log information.

Change-Id: I1f52ae9131760b5e752e136645c19f71b7b166ee
1 file changed