Fix `repo --trace` to show ref and config loads

The value of the varible TRACE was copied during the import, which
happens before the --trace option can be processed.  So instead we
now use a function to determine if the value is set, as the function
can be safely copied early during import.

Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/main.py b/main.py
index df18183..740fb3a 100755
--- a/main.py
+++ b/main.py
@@ -27,7 +27,7 @@
 import re
 import sys
 
-import git_command
+from trace import SetTrace
 from command import InteractiveCommand
 from command import MirrorSafeCommand
 from command import PagedCommand
@@ -79,7 +79,7 @@
     gopts, gargs = global_options.parse_args(glob)
 
     if gopts.trace:
-      git_command.TRACE = True
+      SetTrace()
     if gopts.show_version:
       if name == 'help':
         name = 'version'