Thread-safe truth and attention values.

I misunderstood the std:shared_ptr as being atomic. It's not. That means that locks
are required for reads as well as writes. Alas. This patch series fixes this.