Fix YT end event management

YouTube has changed how the player API manages new players with the
same id. I have improved the whole YT management.