Fix the plugin for the new IPython API

The plugin was not working after installing the code with:

```
pip install -e git+https://github.com/mverteuil/pytest-ipdb#Egg=pytest_ipdb
```

So I ported the code from the [nose-ipdb](https://github.com/flavioamieiro/nose-ipdb) plugin.