[#40] Added synchronizing lock checking
[#40] SQL parser is now reentrant

Lots of tests fail and I don't want to even think about the memory
leaks...
[#40] Many of the tests fixed
[#40] All tests now pass
[#40] Fixed minor bug for doxygen.php on typedefs
[#40] All tests pass now
fixes #40