fix multiple traces related issues

See each issue for details.

#498 Trace when Kudu is stopped
#497 Dump %SCMXXX% env during startup Trace
#496 Write a unit test to ensure 200 limit in Trace.xml
#495 Trace.xml should always trace all explicit user event regardless of Error/Info/Warning.
#493 Proper lock the operation when writing to trace XML