kernel: move thread definitions to thread.h

Move thread definitions to its own header to avoid redeclaration and
redefinition of types which is not allowed in some standards.

Fixes #29937

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
4 files changed