Convert truth values to use smart_ptr

Another major tear-up:  track all truth-value usage by means of smart pointers.

This is another step to enabling direct multi-threaded access.