Improve collecting malloc stats in ASan

Summary:
This change makes races between updates of thread-local stats and
merging all the thread-local stats together less harmful.

Reviewers: kcc

Reviewed By: kcc

CC: dvyukov, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1572