Mark ResourceClient/ImageResourceObserver finished just before notifying

Previously, all clients (except for awaiting ones) and observers are marked
finished just after checkNotify() is called.
However, it is possible that we have clients in |m_client| newly added during
ResourceClient::notifyFinished(), and such new clients shouldn't be marked
finished without calling notifyFinished().

This CL marks a client/observer just before notifyFinished()/
imageNotifyFinished() is called for the client/observer, and removes
markClientsAndObserversFinished() methods.

This CL also introduces MarkFinishedOption for checkNotify() for multipart
images: In multipart images we call notifyFinished()/imageNotifyFinished()
without marking clients/observers finished when the first part ends.

BUG=633696

Review-Url: https://codereview.chromium.org/2210473002
Cr-Commit-Position: refs/heads/master@{#414423}
7 files changed