Jet bundles on Gorenstein curves and applications