libavformat/segment: add an option to write the header to a separate file