fixes possible InvalidStateError when MediaSource.endOfStream is called
allows executiting pending requests even if nextFragmentRules return null
adds an explicit test for undefined value when returning result of rule execution