Fire `onResourceReceived` callback when the resource error occured.

Issue #11163: https://github.com/ariya/phantomjs/issues/11163