Cleanup when a compositor-registered widget is destroyed.