Modify files in src/threads

1. Add DESIGNDOC;
2. Re-implement timer_sleep() in devices/timer.c to avoid busy-waiting;
3. Modify threads/thread.c