[CB-4622]: Allow git URLs with a hash specifying git ref and subdir

Format is https://github.com/foo/bar.git#gitref:subdir. Subdir is
optional, so #gitref is valid, and git refs can be omitted to use HEAD
with some subdir (#:subdir).