Bug 970832 - Balance pending image loading counter

Contacts pictures were not correctly imported because the onscroll
handler was checking the |imgsLoading| counter to be able to stop
pending requests. However, decrementing this variable was only performed
in the onsuccess handler of the image loading. If for any reason you
have some that fails, they would not get accounted as not loading
anymore. Upon onscroll event, this would trigger window.stop() call,
which will at the end break in the middle your pending XHR that perform
pictures import. Thus, we also perform decrementation in the error
handler.
Merge pull request #16721 from lissyx/bug970832

Bug 970832 - Balance pending image loading counter