Explicitly defreference the callback to fix subtle gc bugs

Basically this turned out to be the solution to a super annoying pip bug that has been driving me crazy, you can see details on SO here: https://stackoverflow.com/questions/24522467/python-program-hangs-forever-when-called-from-subprocess

I'd love for this to get merged and a release cut because this is making it hard to land any PRs in pip right now.