Added onUnload callback which stops the webcam when the widget is detached.