Emit warning or raise exception for nonexistent parent module

Python expects __package__, when set, to correspond to the parent
module; this is then used to support relative imports. Ordinarily this
setting is done as part of the import process, however, it is possible
for user code to change or set, including to a nonexistent module. If
the parent doesn't exists, we follow what was done for
http://bugs.python.org/issue3221:

* For absolute imports, emit a RuntimeWarning, since it's possible
  that __package__ is being used for other purposes in code written
  prior to Python 2.6

* For relative imports, raise a SystemError

Ports the corresponding fix from bug 3221 in the get_parent function
in import.c