Move muxer_segment

Made some very sensible changes to the scope of muxer_segment. The
object should be created only once, get tracks added once, and get
finalized once.