Improve upstream comparison tool

Add functionality to quantify the size of the difference (line-based
edit distance) against each upstream. The tool now prints out a guess
of the upstream (based on minimal edit distance) as well as the
quantified difference against each upstream, in tab separated values
format. The comparison currently runs in O(N^2) and takes 10-15min
on a laptop but could be improved to run in O(N * D) for files with
less than D lines difference.

This helps identify which files we have forgotten to update to
OpenJDK8u121, in cases where Android changes exist (i.e. the file
contents are not identical to any upstream).

This reveals that on top of the 111 files without Android changes
that had been forgotten, there are about again that many that had
Android changes. The forgotten files tend to cluster by packages,
i.e. we seem to have forgotten several entire packages.

Test: ./oj_upstream_comparison.py  --upstream_root /tmp/openjdk/
Bug: 35910877
Change-Id: If268785de40cd078d5b722c952480cd46fc3470a
1 file changed