[JENKINS-21952] Resolve tags with slashes

If no revisions are found, try to use the branch as explicit reference.
This could be a tag rel/my-tags or any other explicit reference like a
gerrit changeset (refs/changes/xx/yy/z).