format-patch: move get_patch_filename() into log-tree