internal/v4: disallow names from charm templates

This implements some extra checks required to keep dubious looking
charms out of the charm store.