internal/legacy: implement charm-info endpoint

This requires the SHA256 hash of the content. Rather than clutter the other code,
we calculate this lazily on demand.

That doesn't work, because we want to append the error if updateEntitySHA256 fails too. I've followed the pattern of the old charmstore code here, from which this code is derived.