fdo#72874: Strip const-ness from pointer value when setting it to storage.

Else the pointer type would get demoted to a boolean type which would cause
the boolean version of overloaded function to get picked.

Change-Id: Ided7e8c67ef84b4323c8ad1123e0a2c30ce37e01
Misc cleanup.

Change-Id: Ia3d0f2e098804dabdbdd324562097b9f69528d35
Protect access to the terminate flag.

Change-Id: I9c47e8f114f3d4dcdd5e62b1fffd2b65e7bfb00e
Disallow direct access to member variables.

Change-Id: I82d6c2a2c2844fbb6c2976327b129e42f6b63053