Adding support for onResourceError callbacks

onResourceError was added in PhantomJs 1.9, this enables those events to be exposed through an "resource.error" event in casper.