WICKET-4970 Move the logic for creating the proper PackageResource from PackageResourceReference to ResourceReferenceRegistry

Introduce IResourceReferenceFactory that is used by ResourceReferenceRegistry to create new ResourceReference when there is no registered one for the given attributes (key)
Add Apache licence