globals: Move code from threads.c to globals.c Move all code that handles globals to the place where it belongs.