dvbsubenc: fixed some memory leaks and a crash
Fix leaks of internal GstBuffers, and a crash if subtitle segments end up empty.
Based on a patch by Jurijs Satcs jurijs.satcs@veset.tv
This largely obsoletes gst-plugins-bad!1693 - but that one also has some gap-event-handling changes I don't understand so didn't merge here.