grep: fix hash(linestate) to not include linenum
linestate.eq() just compares the line values whereas hash() does
hash both self.line and self.linenum, which violates the rule. hash()
was added at fb502719c75c, "python 2.6 compatibility: add hash to
classes that have eq" with no additional remarks, so this would probably
be a simple mistake.
The test output changed because difflib.SequenceMatcher() internally uses
a dict. As you can see, the line "export" is unchanged at the revision 2,
so the new output is correct.