core: improved doxygen documentation

improved files complient to issue #950
- thread.h
- flags.h
- debug.h
- crash.h