move packet interleaving function into AVOutputFormat, so it can be overriden easily instead of doing reordering twice if the muxer needs some other interleaving then dts based

Originally committed as revision 3540 to svn://svn.ffmpeg.org/ffmpeg/trunk
