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.

This comment is right, but looks a bit weird given than right below we return an "entry not found"...