gitk: Refactor per-line part of getblobdiffline and its support