Shared objects should store use count with this.

I somehow forgot to do this before. Storing teh use count with
the object saves some cpu cycles, and avoids some memory fragmentation.
Thread-safe truth values

Turns out I was naive about just how thread-safe shared pointers are.
The documentation said that "shared pointers are as thread safe as
raw pointers". Actually, they are less thread safe than raw pointers.
Raw pointers are at least atomic, shared pointers are not even that.
Arghhhh.
Misc cleanup from previous changes.

The high(er)-performance API for truth values won't take version
handles.  Switch the code over to use the new API.
Bug fix in code from recent changes
Merge pull request #515 from linas/learn

Thread-safe truth and attention values.