Uncache images that are no longer valid

When a layer sets a cached image's className to something else than
.olTileImage (e.g. by setting .olTileReplacing), we should not keep the
image in the cache any more, because it may no longer be valid.