* change SysLockType_Reentrant
fix edge case where using SysLockType_Reentrant doesn't trigger an #include pthread.h
* syslocktype_reentrant now a var
* remove nodecl to remove empty system_syslocks.c
* let is better than var.
in reality SysLockType = enum, maybe that would be a better fix
* Locks modules should give a compile error when threads are not enabled.
* fix the compile flags to make the tests pass, or ignore files where necessary.
* Fixed when statement to account for doc builds.