Added tests for hookCommand
Slight changes based on feedback

* defer restorer()
* slight change to error message checking
Add windows userdata support

* refactor cloudinit packages to include support for windows userdata
* fix NewMachineConfig to store corect paths when on windows
Added tests for windows userdata
Changes made based of feedback
Add windows userdata support

* refactor cloudinit packages to include support for windows userdata
* fix NewMachineConfig to store corect paths when on windows
remove global CloudInitOutputLog
Update deps for utils package update
rsyslog: add logrotate for all-machines.log
rsyslog: logrotate comments and docs
rsyslog: logrotate tests
rsyslog: check for logrotate files, updated comments
rsyslog: only render templates once, improve file check test
rsyslog: comments for exported functions
Merge pull request #550 from wallyworld/juju-utils-update

Update deps for utils package update

Fixes bug https://bugs.launchpad.net/bugs/1354685
rsyslog: updated documentation, simplified logrotate file rendering.
worker/upgrader: use already downloaded tools if available

Environment storage was always being consulted when looking for new
tools versions. This change makes it so if the desired tools have
already been downloaded locally, the tools in environment storage
aren't checked.

Although this is a nice shortcut generally, the change is essential to
allow downgrades to the previous agent version in the case of aborted
upgrades. For environments using the local or manual provider,
environment storage isn't available when upgrade mode is active.
Merge pull request #554 from mjs/upgrader-use-local-tools-if-available

worker/upgrader: use already downloaded tools if available

Environment storage was always being consulted when looking for new tools versions. This change makes it so if the desired tools have already been downloaded locally, the tools in environment storage aren't checked.

Although this is a nice shortcut generally, the change is essential to allow downgrades to the previous agent version in the case of aborted upgrades. For environments using the local or manual provider, environment storage isn't available when upgrade mode is active.
Merge pull request #189 from gabriel-samfira/add-windows-userdata

Add windows userdata

* refactor cloudinit packages to include support for windows userdata
* fix NewMachineConfig to store corect paths when on windows
* removed dependency on 7zip (python distribution installed by cloudbase-init has the tarfile module)

PR summary
==========

This pull request refactors the way userdata gets generated. It adds an interface to replace the cloudinit.Configure(), ConfigureBasic() and ConfigureJuju() bits. It also adds an interface to do platform specific rendering of path creation and file creation.

As a result of the new interface approach, there is a need to know the series for which we are rendering the cloudinit config before we reach ConfigureJuju. Because of this need, the Tools field either has to be populated in NewMachineConfig, or a new Series field needs to be added at that time. Given that the provisioner already knows this information when calling NewMachineConfig(), I see no reason to throw away this information and rely on a second structure, that is populated later (Tools) to determine the series (I am open to suggestions though).
Refactor Bootstrap

This is a step towards eliminating our reliance
on provider storage, specifically for supporting
the uploading of tools during bootstrap. A followup
PR will remove the EnsureToolsAvailability function
and make environs/bootstrap solely responsible for
locating and delivering tools to the bootstrapped
instances.

- Environ.Bootstrap now returns the architecture
  and series of the started instance, and a function
  that must be called to finalize the bootstrap
  process. The caller is responsible for filling in
  the Tools of the machine config that is passed in
  to the finalizer.
- environs/bootstrap.Bootstrap now generates the
  system SSH key, and then calls Environ.Bootstrap;
  it finds appropriate tools for the instance based
  on the architecture and series reported, and then
  calls the finalizer.

There are some other refactoring changes:
 - MachineConfig.Constraints is now set by
   NewBootstrapMachineConfig, not FinishMachineConfig;
   only bootstrap machine configs actually set it,
   and the constraints do not change during the bootstrap
   process.
 - environs/manual/bootstrap*.go have been deleted,
   and the minimally required logic moved into
   provider/manual.