Consider the machine when getting filenames.
Add a resource for the API server's machine ID.
Factor out dealing with the API server resources.
The hard-coded machine ID with the value from the API server resource.
Use the proper machine ID when looking for the agent config.
extractResourceValues -> extractResourceValue.
io.Reader -> *os.File.
Add a tag to all the remaining uses of apiserver.ServerConfig.
Merge pull request #1263 from ericsnowcurrently/backups-machine0

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).

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