Fix inheritance_diagram Sphinx extension for Sphinx 1.2

Our [Shiningpanda docs job](https://jenkins.shiningpanda-ci.com/ipython/job/ipython-docs/47/console) got a beta version of Sphinx 1.2, and the inheritance_diagram extension couldn't load.

This change is equivalent to what Sphinx already did with the deprecated `xfileref_role` function ([diff in Sphinx](https://bitbucket.org/birkenfeld/sphinx/commits/56266122d558664d64934b8266e2c9b5851c6896#Lsphinx/roles.pyF321))