[python,python3] Handle shell script sphinx-build
We need to run Sphinx for the right version of Python here, so we can't
just run sphinx-build as that might be for a different version.
Previously we ran $(PYTHON2) $(SPHINX_BUILD)/$(PYTHON3) $(SPHINX_BUILD)
but that fails for homebrew where sphinx-build is actually a shell
script. Instead invoke sphinx.main() from an inline code snippet.
Fixes https://github.com/xapian/xapian/pull/126, reported by Alex Dunn.
(cherry picked from commit
ec4028ce75ea265bae38b23b019254921607c3cc)