Revert "main.model: recount diff lines when applying"

This reverts commit 61409cb8eaea6fcb87efd9e3c556f73285ff062a.
diffparse: simplify and improve diff editing

Unify all diff header parsing into a single regex and unify how we deal
with diff header edits.

We now model the diff ranges using a Range class which owns the start
and end ranges of the diffs.  The only thing our diff edits should ever
do is change the "after" image ranges, so we now have an explicit
set_end() function to handle it.

More edge cases have been added to the unit tests.

Closes #193

Reported-by: Eli Skeggs <skeggse@gmail.com>
Reported-by: Uri Okrent <uokrent@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>