Allow recursive mutexes

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>
Detect recursive mutex lock attempt on non-recursive mutex

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>
Add backtrace capability

* Create lksmith_holder to represent a thread currently holding a lock.

* In lksmith_lock, use a linked list of holders rather than a reference
count of number of holders

* Add lk_dump_to_stderr for debugging purposes.

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>
*_platform.c: don't put a space in the thread name

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>
enable backtraces

Enable backtraces, so that we can see when a thread took a lock (and
perhaps print it out later).

Since glibc's backtrace handler feels the need to call into pthreads
functions for some reason, we have to disable pthread function
interception while calling backtrace.

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>