Added an `onerror` handle in the image plugin.

Added an `onerror` handle in the image plugin. When an image couldn't be loaded (i.e. 404 error), this caused a timeout and in turn, caused a failure to invoke subsequent errbacks from require.js' side (a behaviour I'm still investigating).