combine-diff: move the code to parse hunk-header into common library.