tests: print expected duration in hwtimer_wait
Ensure hwtimer_spin() won't wait for an unreachable stop counter value
without using a costly MOD operation
Merge pull request #1625 from LudwigOrtmann/hwtimer_wait_duration

tests: print expected duration in hwtimer_wait
tests: remove need for pow,log2 in hwtimer_wait

Default to precalculated value for geometric series, so pow and log2
are not needed.
Merge pull request #1617 from rousselk/hwtimer-spin-ovf-fix

Ensure hwtimer_spin() won't wait for an unreachable stop counter value
Merge pull request #1626 from LudwigOrtmann/hwtimer_wait_fixup

tests: remove need for pow,log2 in hwtimer_wait
Fix thread_yield by avoiding the (too) early re-enablement of IRQ,
that is: before the newly selected thread's context is totally restored
Prevent the compiler to add an unwanted prologue in thread_yield()
Fix the race condition when an interruption occured at the beginning
of thread_yield(), i.e.: just after SR(R2) was pushed but before
the rest of the suspended thread's context was pushed!