make: fix #1197

Partial revert of 85b7eca19edf76a5b82c2ebe01e0e90a3292dee7

Fixes #1197.
Merge pull request #1194 from LudwigOrtmann/cortexygen

documentation: fix generation Doxygen documentation after Cortex import
Merge pull request #1198 from Kijewski/issue-1197

make: fix rebuilding on changes without `clean` or `-B`
tests: added a thread_sleep() at the end

Letting the main thread exit could cause failing test if thread_exit()
is broken for the tested platform, preventing the actual testing of the
hwtimer.
Merge pull request #1083 from OlegHahm/test_hwtimer_w_thread_sleep

tests: added a thread_sleep() at the end