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.