Improve obtaining repo name and patchset from Gerrit code views
Created by: marekweb
Fixes a bug where the repo name was not correctly obtained if it contained a slash.
Also fixes #18445 (closed) by getting the correct patchset ID, and the base patchset (if one is specified) from the diff selector dropdown elements, instead of attempting to obtain it from the URL path.