BLD: Rework code that gets version number from git (if available).

I stole parts of mr's ``setup.py`` from pandas. They streamlined theirs a bit, and now this reflects that streamlining. Holler if this causes any trouble, but I don't expect any.

Also, the version number is now correct: (I had 0.6-dev in there from ``mr``.)