added in-memory image cache
replaced os.path and os.listdir with QtCore.QDir, implemented ImageCache.Clear method