demux_ts: implement some things needed for bluray timeline

For experimentation. But it turns out that it's rather useless, so this
commit will probably be not merged into master.

Can be tested with bd://... --demuxer=mpegts