Added support for boot and recovery partitions backup

EMMC of MTK6589 is a large continuous block covering
all partitions. Recovery and boot partitions definitions are
somewhat hidden from MBR and /proc/emmc disabling CWM
to determine correct sizes of these partitions automatically.
This results in CWM using standard fseek/ftell method which
returns the size of the whole EMMC which can be several Gigabytes.

This commit enables to define sizes for boot and recovery partitions
explicitly using BoardConfig flags - so the correct number of bytes
can be copied from these devices during backup.

Two pairs of config flags are available:
CWM_EMMC_BOOT_DEVICE_NAME: defines the name of boot partition device
(typically /dev/bootimg)
CWM_EMMC_BOOT_DEVICE_SIZE: defines size of boot partition in bytes

CWM_EMMC_RECOVERY_DEVICE_NAME: defines the name of recovery partition device
(typically /dev/recovery)
CWM_EMMC_RECOVERY_DEVICE_SIZE: defines size of recovery partition in bytes

During backup, the name of partition being processed is checked against
defined *DEVICE_NAME flag. If matches then size is set from the corresponding
*DEVICE_SIZE flag.

Change-Id: Ia5b8fbd50ff234301ce812e39a648c5cce87e284
Don't print any messages regarding sd-ext to the UI

 * It is ancient.

Change-Id: Ie2e31f9e3c8a2753dccb1bd42425cd5b0ce7780b
Enable mount usb for external storage on datamedia devices

Change-Id: I73b4112983b7b118d738eb224b32f4f0beb5d147
recovery: close zip archive after installation

Otherwise recovery will restart itself (gets killed by vold for
leaving a file open) when reboot is selected.

Change-Id: I915c3082bd99ca994c3a4cbe5ba913866051bc0e
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
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
recovery: sleep after writing partition and closing it

Another speculative attempt to get everything we write actually stored
to the device.

Change-Id: Icf40b0741b4c535e55ea34848073a97d90dc0e70