Add restoring root

Add restiring root and refator prepare/finish restore in machine.go
Improved comments and tests for restoring root
Merge pull request #1305 from perrito666/restore_01_restoring_root

Add restoring root

Add restoring root and refator prepare/finish restore in machine.go

(Review request: http://reviews.vapour.ws/r/619/)