[r=axwalk],[bug=1235717] Fix tools metadata generation for null provider
There's two functional changes here:
- If there's existing tools metadata, use it
if it has sha256/size in it, and the tools
haven't been replaced.
- Don't use net/http or the tools URL when
fetching tools to compute sha256/size. That
doesn't work with sshstorage.
- Don't fetch existing tools to resolve metadata
during normal tools syncing operations. Only
the "juju metadata generate-tools" command
will do this now.
Additionally, I have refactored
environs/tools/simplestreams.go, to make the
intent of WriteMetadata (now MergeAndWriteMetadata)
more obvious. That function is now composed of
several other more specific functions.
Fixes #1235717
https://codereview.appspot.com/14527043/