Keep docs inside the checkout in dev.

Having them in /tmp is inconvenient on OSes that wipe /tmp at each
reboot.
Fix #19834 -- Adapt to Sphinx' new genindex JSON.