core: improved doxygen documentation

improved files complient to issue #950
- thread.h
- flags.h
- debug.h
- crash.h
Merge pull request #958 from haukepetersen/doxygen_fix_core_1

core: improved doxygen documentation