Add tools/install_pip.sh

Install a known working recent version of pip that handles installation
dependencies more correctly than before.  Extract to a separate script
so it can be used apart from stack.sh.

* Install distro setuptools if it not already present
* Install pip from source tarball as get-pip.py proved to be unreliable
* Remove python-distribute and python-pip from all prereq files,
  move python-setuptools to 'general'
* Remove the earlier unfubar_setuptppls() call that attenpted to fix this
* Only update requirements.txt when no changes in repo

Tested on Precise, F18 and CentOS6.
* Fedora and RHEL allow pip to install packages ON TOP OF RPM-installed
  packages.  THIS IS BROKEN.  And is one reason we have to be so picky
  about order and so forth.

Change-Id: Ibb4b42119dc2e51577c77bbbbffb110863e5324d
diff --git a/functions b/functions
index fe37e4c..14ed180 100644
--- a/functions
+++ b/functions
@@ -1140,8 +1140,11 @@
 
     echo "cd $REQUIREMENTS_DIR; $SUDO_CMD python update.py $project_dir"
 
-    (cd $REQUIREMENTS_DIR; \
-        $SUDO_CMD python update.py $project_dir)
+    # Don't update repo if local changes exist
+    if (cd $project_dir && git diff --quiet); then
+        (cd $REQUIREMENTS_DIR; \
+            $SUDO_CMD python update.py $project_dir)
+    fi
 
     pip_install -e $project_dir
     # ensure that further actions can do things like setup.py sdist