PeriodicTableView: Fix a memory leak

The memory leak was caused by drawing cache not being cleaned on view destroy.