Fixed #1111: hpx::threads::get_thread_data always returns zero, added test