Fixes and improvements on multiperiod prefetch logic
Created by: epiclabsDASH
Move multiperiod prefetch logic to BUFFERING_COMPLETED event handler. Prefetch should be executed as soon as one of the tracks (video or audio) of the period has finished.
Waiting until the end of all the tracks could cause small gaps in period transition in case of having tracks with considerable different duration.