fdo#84617: Guard the destructor with SolarMutex.

The same pattern as introduced elsewhere recently.

Change-Id: Ie7b4fd1ec26d417f63bee26dd336dfc54f4847dc