scons: Check for known buggy version of SWIG (2.0.9)

SWIG version 2.0.9 uses fully qualified module names despite of the
importing module being in the same package as the imported
module. This has the unfortunate consequence of causing the following
error when importing m5.internal.event:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "src/python/importer.py", line 75, in load_module
    exec code in mod.__dict__
  File "src/python/m5/__init__.py", line 35, in <module>
    import internal
  File "src/python/importer.py", line 75, in load_module
    exec code in mod.__dict__
  File "src/python/m5/internal/__init__.py", line 32, in <module>
    import event
  File "src/python/importer.py", line 75, in load_module
    exec code in mod.__dict__
  File "build/X86/python/swig/event.py", line 107, in <module>
    class Event(m5.internal.serialize.Serializable):
AttributeError: 'module' object has no attribute 'internal'

When 'event' is loaded, it triggers 'serialize' to be loaded. However,
it seems like the dictionary of 'm5' isn't updated until after
__init__.py terminates, which means that 'event' never sees the
'internal' attribute on 'm5'. Older versions of SWIG didn't include
the fully qualified module name if the modules were in the same
package.
scons: Include flags required to link statically with Python

Python requires the flags in LINKFORSHARED to be added the linker
flags when linking with a statically with Python. Failing to do so
typically results in errors from the Python's dynamic module loader at
start up.
base: Make the Python module loader PEP302 compliant

The custom Python loader didn't comply with PEP302 for two reasons:

 * Previously, we would overwrite old modules on name
   conflicts. PEP302 explicitly states that: "If there is an existing
   module object named 'fullname' in sys.modules, the loader must use
   that existing module".

 * The "__package__" attribute wasn't set. PEP302: "The __package__
   attribute must be set."

This changeset addresses both of these issues.