gopls/internal/fake: sort edits by both start and end position
gopls/internal/fake: sort edits by both start and end position

When processing edits, they must be non-overlapping but they may be
adjacent: we must allow for insertions adjacent to replacements, e.g. an
edit of 3:1-3:1 followed by an edit of 3:1-3:15. Achieve this in the
fake editor by sorting edits by end position after start position.

Longer term, we should eliminate this ad-hoc editing in favor of
diff.ApplyEdit.

Change-Id: I72a252952585d0a652d97287486aa61c167db485
Reviewed-on: https://go-review.googlesource.com/c/tools/+/431219
gopls-CI: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Dylan Le <19fed614f843e0de8399ba7a25e061ee66748da3@google.com>
Run-TryBot: Robert Findley <9179eee875d1ee628c37fb47d7e749e855ffd21f@google.com>

golang/tools,golang/tools,golang/tools,golang/tools,golang/tools