Cancel load event on a failed image resource fetch.

If the image loader is notified of a resource that finished loading
with an error, make sure the pending load event is cancelled and an
error event is dispatched in its stead.

R=
BUG=324417
TEST=http/tests/misc/image-onerror-no-load-event

Review URL: https://codereview.chromium.org/113633005

git-svn-id: svn://svn.chromium.org/blink/trunk@164111 bbb929c8-8fbe-4397-9dbb-9b2b20218538