core: sched: thread: optimize thread status field usage

see PR #716 for discussion

this changes semantics of the tcb's tread status field so that ON_RUNQUEUE doesn't waste a whole bit.

It also moves thread_getstatus()'s return value definition to thread.h.