1. add Tid API UT
2. add Trace UT
3. Fix a crash issue when set NULL trace
Merge pull request #1370 from dongzha/addAPIUTTid

Add Tid/Trace API UT and Fix a bug when set NULL trace