Use the proper machine ID in backup and restore.

To accomplish this we add a new API server resource, "machineID", which is pulled from the agent conf.  At that point backups can use that value when creating a new archive.  Once the archive has the correct machine ID, we can use that ID in restore.

Fixes https://bugs.launchpad.net/juju-core/+bug/1398837 (and partially 1389362).