DOC: Fix building of a single API document
As reported in #24503#issuecomment-450586329, building a single document of the API (e.g. `./doc/make.py html --single=pandas.read_excel`) is broken after splitting `api.rst` in multiple files in #24462.

This PR fixes it.