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
Better ignore syntaxerror stack traces in wheels

This already got stripped just fine for non-wheel installs, but for
wheels, it only stripped the lined where `SyntaxError` was present
leaving the rest of the stacktrace.
Merge pull request #2071 from mattrobenolt/syntaxerror

Better ignore syntaxerror stack traces in wheels
Merge pull request #2069 from msabramo/GH-1867_names_by_commit_deterministic

Fix GH-1867: non-deterministic name for git editables on Python 3
Fix issue #1083.

This commit escapes the egg "surname" when using git with freeze.
Change "escape" to "translate" in escape_egg_surname().
Update docs to explain the "version" component of the egg name.
Add functional test for issue #1083.
Fix code comment ("tag" to "tag or branch").
DRY up use of repo directory in test_freeze_git_clone().
Merge pull request #2080 from dstufft/pr/2063

Rebase #2063
.gitignore: add .sw[a-z] files

for ViM swap files
unpack_url: session only needed for unpack_http_url
vcs: add documentation to VersionControl class