Calculate TaskHash while constructing PackageTask (#4016)
We want to calculate this earlier, because it has some important side
effects such as gathering the hashable inputs, etc. By moving this up
the chain, we can ensure that more information is available for run
summary and dry run summary in a consistent way.