RIOT-OS/RIOT — pull request #1376 by LudwigOrtmann (2014-07-07 13:23:12+00:00)
Title: core/sched fixup and optimize

* fix some broken misuse of variables (mixing `tcb_t` and `pid_t`)
* fix condition logic (`X && Y != Y` -> `X && (Y != Y)`)
* fix setting and use of `thread_active_pid`, includes optimizations
* refactor `SCHEDSTATISTICS` to make it faster
* remove stale TODO and double spaces