Fixed ambiguous ls-remote with refs/heads/...

This is the smallest possible change to solve the
issue of CI builds being triggered again and again.
ls-remote will always be definite when "refs/heads/<branchName>"
is used as branchSpec.

All other issues tried to solve with Pull Request
https://github.com/jenkinsci/git-client-plugin/pull/129
are still open. But using refs/heads/ would already solve
the CI issue.
Added tests, refactored and improved branch spec normalization
Fixed refs/remotes/ handling

...and refs/tags/ (to be discussed - but does not harm).
Fixed ambiguous ls-remote with refs/heads/...

This is the smallest possible change to solve the
issue of CI builds being triggered again and again.
ls-remote will always be definite when "refs/heads/<branchName>"
is used as branchSpec.

All other issues tried to solve with Pull Request
https://github.com/jenkinsci/git-client-plugin/pull/129
are still open. But using refs/heads/ would already solve
the CI issue.
Added tests, refactored and improved branch spec normalization
Fixed refs/remotes/ handling

...and refs/tags/ (to be discussed - but does not harm).
Do not change name of protected method
Remove a purely whitespace modifying change
Update LegacyCompatibleGitAPIImpl compatibility comments

The LegacyCompatibleGitAPIImpl behaviors need to be retained so that
we don't break legacy use models.