Fix compatibility with Python 2.5

Our controlled_subprocess context manager used Popen.kill, which is only
available in Python 2.6. Additionally, os.kill didn't gain windows
compatibility until 2.7, so we're stuck having to do some kind of gross things
to kill the process.

Fixes bug 2935.