Pass the thread type and exception base to core with a 'Native_cpu' component instead of enhancing the 'Thread_state' class. Fixes #2298