Make the pip cache work with djangopypi2

Also add a test function that allows messing with the cache-creating
regex with some assurance that you're not trampling other people's
index-parsing.