doc: Enable book index in XSLT builds

The XSLT toolchain requires an empty <index> element where the index is
supposed to appear.  Add that with conditionals to hide it from the
DSSSL build.
Switch order of -lpgport and -lpgcommon

Conceptually, libpgcommon can depend on libpgport, but not the other way
around.  In the past, this might not have mattered, but it's needed now
for asprintf.