(orcc-lib) Move thread-related code to orcc-native library.