Make legacy prop environment available to recovery

Google changed the in-memory format for storing properties in 4.4.
Zips containing an older update-binary expect the old format, otherwise
assertions on properties in the update script fail.

This is just enough of the old property service to copy the properties
to the legacy format before running the updater.

Note: this commit has been amended from the original version by _that.
1) It has been trimmed to only provide the legacy prop environment.
Edits to install.c are done in a separate commit from scratch to
maintain apache2 licensing in this repo.
2) Return values are given to check whether prop environment was setup
successfully.
3) Slight formatting changes.

Change-Id: I1fa9f96fa7a62c7eaba852e4d62e793cd6818907