Fix #1995 "PDF: requests for resources must be internal"

- change property so that all paths are internal except eXist ones
- don't use in-scope XPath context in XPL function library

Entered #1998 to suggest clearing/restoring `ThreadLocal`s.