Fix GH-1867: non-deterministic name for git editables on Python 3

Determine names_by_commit deterministically.
Add test_git_get_src_requirements
Git.get_src_requirement: Get first matching ref alphabetically

so that the result is deterministic and predictable
Merge pull request #2069 from msabramo/GH-1867_names_by_commit_deterministic

Fix GH-1867: non-deterministic name for git editables on Python 3