Use img.onerror listener for img.onabort.
Add one more test.
Add support for onProgress and onComplete events.
Add tests for events. Due to loader's event-driven nature all tests have to be asynchronous.