squashed commit of these 2 from the cm repo.

build: Add "installrecovery" command
* Similar to "installboot", add an "installrecovery" command which
   writes the recovery image to the correct partition of a running
   device.

original commit cyanogen

build: installboot: support mtd partition
Change-Id: I357b8bc35b77e359c676882cd5a3bf05dc5ecfd2

original commit pawitp