Add a test for missing files.
Make the logs optional.
Add TODO comments.
Log missing files.
Add one more TODO.
Merge pull request #1258 from ericsnowcurrently/backups-missing-logs

Make log files optional in a backup archive.

https://bugs.launchpad.net/juju-core/+bug/1398448

(Review request: http://reviews.vapour.ws/r/572/)
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/)
Copy database sessions.
Retry if the session drops.
Move the session copy into NewDBInfo.
Fix a typo.
Use errors.Cause.