Miscellaneous thread patches
Provided by mynick1 on IRC. Applies to 0.7, not checked for merge conflicts. Author comments follow.
Patch description for threads:
- Added the missing header guard in the C header file
- Fixed some memory leaks (by adding 5 missing calls to "free")
- Removed the poor's man :( debugging system
- Added the "set thread priority low/normal/high" functions
- Made WaitThread looking more similar to the SDL interface
I don't have tested the patch extensively, but only for a short while and only on Linux with the SDL interface...