Better detection of multiple changes in a document

Detects changes to different parts of the document as independent from each
other. Refactored parser passes all tests the previous parser passed plus
a number of new tests which fail with the original parser.

Change-Id: I65fdc6d9f922cbe9ff684332945def3776c70d30
Link to any heading not just a main heading

Echo's detection of section links was limited to the main heading that have
==Foo==, with exactly two ==.  This updates the regexp patterns involved to
correctly detect(and hence, link) to sub sections if thats where the edit was
made.

Bug: 48484
Change-Id: Iedbe3404ec265a7f2183629b463a3d672dc9098e
Merge changes Iedbe3404,I65fdc6d9

* changes:
  Link to any heading not just a main heading
  Better detection of multiple changes in a document