bug 1108787 dispatch progress even when timer runs late r=cpearce

avoiding skipping progress events when data is received only soon after the
previous progress event.

--HG--
extra : rebase_source : 5108ae7d91bac613ed67f85c0963c6ca020bee07
bug 1108787 use NowLoRes() for progress event timing r=cpearce

Precision is not required, and is more costly on some platforms.

--HG--
extra : rebase_source : de36a0d249a89e579a7433f40c89b339f7db5b49
bug 1108838 move stalled/progress timing from MediaDecoder to HTMLMediaElement r=cpearce

This provides that mNetworkState is available for determining whether progress
notification from the resource/MediaCache after stalled should resume progress
events.  The timer will be stopped while stalled in a subsequent patch, and
should not be restarted unless NETWORK_LOADING.

--HG--
extra : rebase_source : e335555de404f6a899762be3c05b8f5444c357e3
bug 1108838 dispatch "stalled" even when no bytes have been received r=cpearce

This is important for MediaSource, where there is no initial request to set up
the stall counter by sending an initial progress event.

For sources using ChannelMediaResource, this means that stalled can now fire
before an HTTP response is received.

Also reset stalled timer on transitions to NETWORK_LOADING,
and don't run the progress timer while stalled.

--HG--
extra : rebase_source : cf2cf8a4de37ca4859761941946393e9747c0706
bug 1108846 notify MediaSourceDecoder of bytes downloaded to trigger progress events r=kinetik

--HG--
extra : rebase_source : d13f3a9c46cce745cffc86a179875f34e7a52428