Support Python 3

I wondered how hard it would be to make `git when-merged` support Python 3 and the answer turned out to be "not very" and I don't think it makes the code particularly messy, so here's the pull request :smiley:

This does mean that support for Python 2.5 has to be dropped (it doesn't support the "`as`" syntax in `except` blocks), so feel free to just close this if you'd rather keep support for that.