hls: Rewrite HLS demuxer to better deal with live streams