recovery: copy logs to cache more aggressively

Copy logs to /cache immediately upon a package installation failure;
don't wait for recovery to finish.  (If the user reboots without
exiting recovery the "right" way, the logs never get copied at all.)

Change-Id: Iee342944e7ded63da5a4af33d11ebc876f6c0835
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
fix secure adb in recovery

Recovery's init.rc was missing a line (added to the main system's
init.rc in change Ic97fd464440ff4a29fc9da7ad15949ac5215ade3) is
required for secure adb to work.

Change-Id: Id79b94d2abb4cbe3cca7cabeb4bc5faf7205e56b