core: Make global io_service and scheduler thread-local

Change-Id: I3d6b6cd3ca7a6e53b0dc0f4cae7a2f3270c7fd50
Refs: #2489
diff --git a/wscript b/wscript
index 8133b93..955266b 100644
--- a/wscript
+++ b/wscript
@@ -102,7 +102,7 @@
 
     conf.check_cxx(header_name='ifaddrs.h', mandatory=False)
 
-    boost_libs = 'system chrono program_options random'
+    boost_libs = 'system chrono program_options random thread'
     if conf.options.with_tests:
         conf.env['WITH_TESTS'] = 1
         conf.define('WITH_TESTS', 1);