Compare unit file sizes as part of determining whether a unit needs to be downloaded

Compare unit file sizes as part of determining whether a unit needs to be downloaded.  The main reason for doing this is to be sure we are not fooled by partial downloads.  This includes:
- publishing the file sizes
- comparing the file size specified in the unit to the file on disk.

Also, slight reworking of published directories (read as distributions).  Fixes case where downloading the tarball associated with a unit referencing a directory in the storage_path would fail because it would try to download the tarball to the storage_path, which is a directory.  The change is to write the tarball as a file with a different name and store that path as tarball_path in the content unit instead of the published_as_xx flag.  Download that and extract into the actual directory.