Fix use-after-free in ThumbnailCache::remove()
A bug was reported on OpenBSD that ThumbnailCache causes a crash: the item pointed to by the iterator it
is removed, then the entry in m_cache
pointing to the iterator is removed. Patch contributed by user in BUG 463764 (comments are my own).