Automatic selection of most recent gallery templates

This change allows the selection of the most recent gallery templates based on version when a publisher or template name or partial name is supplied.
This code sets GalleryTemplateIdentity which would be checked by the next if statement and follow that logic there.