Make pdf_output_obj consistent with pdf_fprint_obj

Pass in the 'tight' flag.
Tweak pdfclean and pdfinfo to be useful as libraries.

Firstly, we remove the use of global variables; this is done by
introducing a 'globals' structure for each of these files and
passing it internally between functions.

Next, split the core of pdfclean_main into pdfclean_clean, and the
core of pdfinfo_main into pdfinfo_info.

The _main functions now do the argv processing. The new functions now
run entirely thread safely, so can be called from library functions.