[Reviewer: Rob, From: Alex] DO NOT MERGE New homestead API code review.

Rob, as discussed, here is the code review for the homestead implementation of the new API. Still to do:
-  Logs and commenting. 
-  Changes to the homestead.postinst to properly handle upgrade. 
-  Fixes coming out of live testing.