Tighten up sys.path, and use absolute imports everywhere.

For convenience, we had added the folder that dotest.py was in
to sys.path, so that we could easily write things like
`import lldbutil` from anywhere and any test.  This introduces
a subtle problem when using Python's package system, because when
unittest2 imports a particular test suite, the test suite is detached
from the package.  Thus, writing "import lldbutil" from dotest imports
it as part of the package, and writing the same line from a test
does a fresh import since the importing module was not part of
the same package.

The real way to fix this is to use absolute imports everywhere.  Instead
of writing "import lldbutil", we need to write "import
lldbsuite.test.util".  This patch fixes up that and all other similar
cases, and additionally removes the script directory from sys.path
to ensure that this can't happen again.

llvm-svn: 251886
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 278b22c..9148b34 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -19,14 +19,10 @@
 """
 
 from __future__ import print_function
-# this module needs to have global visibility, otherwise test cases
-# will import it anew in their local namespace, essentially losing access
-# to all the configuration data
-globals()['lldbtest_config'] = __import__('lldbtest_config')
-
 import use_lldb_suite
 
 import lldbsuite
+import lldbtest_config
 
 import atexit
 import commands
@@ -1058,7 +1054,6 @@
     toolsLLDBServerPath = os.path.join(scriptPath, 'tools', 'lldb-server')
 
     # Insert script dir, plugin dir, lldb-mi dir and lldb-server dir to the sys.path.
-    sys.path.insert(0, scriptPath)
     sys.path.insert(0, pluginPath)
     sys.path.insert(0, toolsLLDBMIPath)      # Adding test/tools/lldb-mi to the path makes it easy
                                              # to "import lldbmi_testcase" from the MI tests