Restore getpath.c closer to upstream

Instead of changing the control flow significantly, use SetPythonHome,
-DPYTHONPATH, and a handful of ifdefs.

Test: build/soong/python/tests/runtest.sh
Test: git diff 18e21883a4..HEAD -- Modules/getpath.c
Change-Id: I27ca46f953c160e437b1610085cc756056ba3812
3 files changed