Ghetto cherry-pick of 7f16edb. Initial attempt to cherry-pick failed.

Add options to pip install moduleand state

The following options areintroduced:
    --allow-all-external
    --allow-external
    --allow-unverified
    --process-dependency-links