boatload of fixes to get self-tests to compile+mostly run
refs #117
stub_impl_hack: defines a function otherwise provided by main.cpp
remove old self_test.h contents (e.g. TEST); superceded by cxxtestgen TS_ASSERT etc.
only include self_test from a test (otherwise, cxxtest include dir won't be set)
cxxtest won't run tests named only "test"; add more descriptive name
FIXES uncovered by self tests
lib: infinite loop in log2
lockfree: incorrect params