Force resource names to be unique and non-empty

At some resource_create and resource_update validation to enforce unique
and non-empty resource names within a package.

If no resource name is given, try to generate one from the uploaded or
linked-to file.