sr: Add bu support

Change-Id: Ifd6f638553d2eff8bb43138067ef8b98af0c2520
sr: Initial dialog implementation

Implement two types of dialogs: info and error.  Info dialogs are intended
to show that an operation is in progress and cannot be interrupted.  Error
dialogs are intended to show that an error occurred.  The user must respond
by dismissing the dialog with any input (a swipe or keypress).

Dialogs may be initiated internally within the UI code or externally via a
named local socket.  Dialogs created via socket are presumed to be info
and may not be dismissed.  When the client socket is closed, the dialog
automatically dismisses.

Initial implementation shows dialogs for adb backp and restore.  Future
work will show dialogs for all errors and lengthy operations.

Change-Id: Icefea12ec0fd70fb487d54aa2eb1cae9dd451355
sr: Fix overlay for non-BSP MSM

See:

  https://github.com/CyanogenMod/android_bootable_recovery/commit/fa2288a1bb3e218f5558b751021524abd5394700
  https://github.com/CyanogenMod/android_bootable_recovery/commit/56827c633fd38b79aaae0a2d2a55fe41f7cd2ca1

Change-Id: Ic168386b2d8085a8e63ecf7fd483c881b120b6d2
sr: Remove hardcoded paths

Change-Id: I62c87e8af6cf89d374907df4c72b21e12c3ca926
sr: Clear umask

This fixes gapps and possibly other packages that copy files out to /tmp
and then to /system without fully resetting all permissions.

Change-Id: I9b8433d643f012708ad5ce455906a67c3d7b91ab
sr: Support dynamic storage paths

Create new menu "apply update".  Populate it with ADB and all available
storage devices.

Details:

 * Remove concept of "primary storage"; treat all storage paths equally.
 * Remove unreachable remnants of "apply update from cache".
 * Remove unmount_when_done argument to update_directory() (this was added
   with the cache option).  Caller must manage mounts.
 * Introduce get_storage_items() and ensure_volume_{mounted,unmounted}() to
   handle vold mounts.
 * Introduce mkdir_p() to cope with arbitrary mounts (eg. /mnt/x/y).
 * Introduce logic to determine if device is datamedia.
 * If device is not datamedia, remove the "wipe media" option and silently
   ignore requests to wipe it (eg. via command line).
 * Do not automount vold managed volumes.  This was apparently missed in
   squashed commit 311abb7.

Change-Id: I47e13a48fe801ec08155288adbfe20e1eb5b6307
sr: bu: Fix a couple backup bugs

 * Backup directory entries so that they are restored with proper perms.
 * Exclude special files (devices, sockets, etc.)
 * Exclude /data/media on datamedia devices.

Backup and restore should be functional now.

Change-Id: I31ac9727658443a3fcf5910ccc7100c50e223cf2
Merge "sr: Support dynamic storage paths" into cm-11.0
Merge "sr: bu: Fix a couple backup bugs" into cm-11.0
sr: Honor recovery variant

Change-Id: Ifd6f638553d2eff8bb43138067ef8b98af0c2520