thread_util: add proper memory barriers to fix TSAN bugs
thread_util: add proper memory barriers to fix TSAN bugs

Without this fix, thread_util-test and mt-hdr_histogram-test fail under TSAN.

Change-Id: If2ae27336d9af0db8d79cd8fe67c4d78c5dce635
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2050
Tested-by: jenkins
Reviewed-by: Michael Percy <e07a1fd797b473a9c849e618aa2ce06d8055760b@cloudera.com>

andrwng/kudu,InspurUSA/kudu,cloudera/kudu,andrwng/kudu,InspurUSA/kudu,EvilMcJerkface/kudu,andrwng/kudu,andrwng/kudu,EvilMcJerkface/kudu,helifu/kudu,cloudera/kudu,InspurUSA/kudu,cloudera/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,cloudera/kudu,InspurUSA/kudu,InspurUSA/kudu,cloudera/kudu,helifu/kudu,EvilMcJerkface/kudu,InspurUSA/kudu,InspurUSA/kudu,cloudera/kudu,helifu/kudu,helifu/kudu,cloudera/kudu,cloudera/kudu,cloudera/kudu,EvilMcJerkface/kudu,andrwng/kudu,andrwng/kudu,helifu/kudu,andrwng/kudu,InspurUSA/kudu,EvilMcJerkface/kudu,andrwng/kudu,helifu/kudu,helifu/kudu,EvilMcJerkface/kudu,helifu/kudu,andrwng/kudu,helifu/kudu,EvilMcJerkface/kudu,InspurUSA/kudu