Bug 1051530. Update the nsImageLoadingContent state when we get a decode complete notification so that decode errors are recorded in our image state. r=bzbarsky

In nsImageLoadingContent whether a decode error put our image state into error depends on when the decode starts in relation to the network load event for the image. In nsImageLoadingContent::OnStopRequest if a decode has been started then we wait until the decode is complete to fire the load/error event. When we fire this event we also update the image state. However if a decode has not started by the time OnStopRequest runs, but a decode does happen later then when it completes nsImageLoadingContent::Notify does nothing, and our image state stays as non-error.