Save a copy when advancing to dependent GIF and WebP animation frames

As clearCacheExceptFrame anyhow clears dependent frame, this is causing no
change in cache content: instead of create new, copy and clear old, we do:
swap content of old and empty new.

Measurements for GIF file are available in the crbug.com/490895

BUG=490895, 425474

Review-Url: https://codereview.chromium.org/2155973002
Cr-Commit-Position: refs/heads/master@{#422125}
9 files changed