fix(vg-media): Fix memory leaks when destroying playing video
fix(vg-media): Fix memory leaks when destroying playing video

VG-Media can hold onto subscription references when moving from page to page while a video is
playing.  Various subscriptions are set to unsubscribe on pause, but if the component is destroyed
while playing (with no pause event fired) a reference of Videogular gets held onto.  This change
adds an unsubscribe to any subscriptions that can be created (while checking for existence prior to
attempting an unsubscription).  The bufferDetected Subject also runs a complete to ensure
unsubcription of any subscribers, and then unsubcribes itself.  The unsubscription of itself might
be unnecessary, but as a Subject is both an Observable and an Observer this seemed to be the safest
approach.

565

amitkumarmahajan/videogular2,amitkumarmahajan/videogular2,kwarismian/videogular2,videogular/videogular2,kwarismian/videogular2,videogular/videogular2,videogular/videogular2,amitkumarmahajan/videogular2,kwarismian/videogular2