Don't do lock/unlock within an assert...

... unless we want it to be compiled when when NDEBUG is defined!
This is how the CMake module says to use it.

The documentation in FindThreads.cmake doesn't say anything about clients testing MAKE_USE_PTHREADS_INIT.
Simplify libtesla locking API.

The unit of locking in libtesla has always been a tesla_class.
Now, we can just simplify the API to make it easier to convince ourselves
of its correctness:

 * tesla_class_get() returns a locked tesla_class
 * tesla_class_put() unlocks the tesla_class