Ensure JS-owned memory is not leaked if a script task fails. Fixes #2201.
auto merge of #2202 : jdm/servo/scriptleak, r=Ms2ger

....