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
Record files don't always include directories so find eggdir by looking for a file within it.

Fixes #2075
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
Update freeze.py output to match command's usage

Remove --freeze which appears not to match usage.
Use the command's name in the message produced.
Better detection of egg-info dirs
Merge pull request #2076 from abadger/feature/no-egg-info-dir-in-record

Record files don't always include directories so find eggdir by looking ...
Update changelog to include PR #2076
Include a "simple" User-Agent string as well as the JSON

To facilitate detection of pip in scenarios where parsing JSON isn't
easy but simple string matching is, change the User-Agent to be of
the form "pip/{version} {json}" instead of just "{json}".

The contents of the JSON data has not changed.
Merge pull request #2086 from dstufft/simpler-json-prefix

Include a "simple" User-Agent string as well as the JSON