After cd0a5889d71, unittest would run in shard mode where many tests share a single process. Need to clear some global state to make the test results stable. Reviewed By: thetruestblue, rsundahl Differential Revision: https://reviews.llvm.org/D124591