Thread: fix some issues with double definition of shared_state_base and avoid ambiguity of disable_if with Boost.Test.