Redmine#4535: improve logging on loading extensions

see https://cfengine.com/dev/issues/4535 and #1431 

I propose much more debugging information here.  I think it's useful.

Also I fall back to `WORKDIR` if `GetWorkDir()` doesn't work for loading the plugins.  This is in case we're running as non-root and `~/.cfagent/lib` doesn't have the plugin libraries, but they have been installed in the normal `WORKDIR/lib`.