commit-graph: unify the signatures of all write_graph_chunk_*() functions