dashdemux: expose all streams

always expose all streams instead of only exposing one of each type.

This is more aligned with gstreamer's way of working. Allows the user
to select the stream that it wants to use by linking its pad and leaving
the unused ones as unlinked.
dashdemux: run gst-indent

Lots of indentation issues making it very annoying to commit
because of the indent hook. Fix this for once.
dashdemux: refactor fragment fetching into smaller functions

Makes it easier to maintain and extend. This is a first step into
adding multi language support to dashdemux
dashdemux: Use 1 download task per stream

Instead of having a single download task for all streams, this
commit makes each stream have its own download loop, allowing
parallel download of fragments.
dashdemux: handle multiple languages

Handle multiple languages by using the not-linked return to stop
the download task for that stream. It can be reactivated when
a reconfigure event is received. Stopping the unused streams is
relevant to save network bandwidth
dashdemux: add combine flows function

Use a flow combination function to decide the result from the
stream_loop
dashdemux: fix multiple period mpd playback

Make dash playlists with multiple periods work again by waiting
to switch the periods when all streams have reached the end of
the current period. The stream_loop is responsible for advancing
the period, but the download loops will already start downloading
data for the next period as soon as possible.
dashdemux: simplify locking for streams

Use a single lock for all streams instead of having separate locks.
This makes maintenance easier and at most points we would need
a single lock before iterating on all streams data. So not much
is gained from individual locks.
dashdemux: store GstActiveStream to avoid getting it every time

GstActiveStream is used everywhere to operate on the MPD client,
better store it in the GstDashDemuxStream to avoid getting it
everytime
dashdemux: use a separate GstUriDownloader per stream

Avoids one download having to wait for another to finish
before starting
dashdemux: do not try to access buffer after losing the ref

For obvious reasons
dash: detect EOS when segments are generated by template

Use the Period duration do know when to end the stream
uridownloader: fix deadlock near EOS

A deadlock can happen when the source sends EOS when
being put to NULL as the object lock is being held by the
thread that sets the element to NULL and is needed by
the event handler.
dashdemux: remove stream loop thread

Download and push from the same task, makes code a lot simpler
to maintain. Also pushing from separate threads avoids deadlocking
when gst_pad_push blocks due to downstream queues being full.