backport of GEOS-5370: thread locals access for WPS processes

Useful to get authentication info (and so access to secured layers) and other info contained in thread locals inside WPS processes