fru-device: Fix bus lock timeout

When we have a bus that can't get scanned, it locks up
on us for a couple minutes, which is much too long. There
was a thread added, but std::future's destructor blocks,
causing the timeout to still happen. Move the close into
the same scope as the std::future to force stop the blocking
i2c transaction so that we can continue. Also create a bus
blacklist that once a bus locks up on us we stop scanning it
so next scan we avoid the bad bus altogether.

Tested: Added bad bus (i2c9) to wfp and startup time was
near normal.

Change-Id: I22e224a69236a6dfe0a1549ed0e4239e22cdf5d2
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0605dd9..6bc5362 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,7 +78,6 @@
 add_definitions (-DBOOST_ALL_NO_LIB)
 add_definitions (-DBOOST_NO_RTTI)
 add_definitions (-DBOOST_NO_TYPEID)
-add_definitions (-DBOOST_ASIO_DISABLE_THREADS)
 
 include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include)
 include_directories (${Boost_INCLUDE_DIRS})
@@ -121,7 +120,8 @@
 )
 
 set (PACKAGE_DIR /usr/share/entity-manager/)
-target_compile_definitions (entity-manager PRIVATE PACKAGE_DIR="${PACKAGE_DIR}")
+target_compile_definitions (entity-manager PRIVATE PACKAGE_DIR="${PACKAGE_DIR}"
+                            -DBOOST_ASIO_DISABLE_THREADS)
 install (TARGETS fru-device entity-manager DESTINATION bin)
 install (DIRECTORY configurations DESTINATION ${PACKAGE_DIR})
 install (DIRECTORY overlay_templates DESTINATION ${PACKAGE_DIR})