knotserver: use common ancestor to calculate diffs
the existing diff calculation approach directly compares branches, this forces linear history for merge. this patch updates the diff logic to use the common ancestor commit to calculate diffs.
```
P Q
o---o topic
/
/
o---o---o---o master
A X Y
```
when diffing topic and master directly with difftree (Q and Y), the commits introduced in master since the creation of the branch, namely, X and Y, are considered "removed" from the generated patch. however, when diffing with the common ancestor A, only changes introduced by P and Q are included in the produced patch.
this calculation can be retired in favor of format-patch soon enough (i think).