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.
Merge pull request #863 from ahocevar/uncache

Uncache images that are no longer valid. r=@bartvde