Add some more (disabled) debug output
PDF extension: simplify states

Simplify the "none", "native", "pdfjs" states
of the pdfState variable to two values: "none" and "pdf".

Also provide convenience methods for setting/testing them,
and simplpify the logic using them.