Call gen_reference.py from Sphinx's conf.py.

This should fix ReadTheDocs project, which currently doesn't include any
of the generated reference pages.