[tcling] Use more variables to denote clearly the state and intent.
[tcling] Use more variables to denote clearly the state and intent.

We might be in a situation where we linked the library into an executable and
our trigger function is inside it. In that case we should use the executable to
find the base path and look for a shared library with the specified
`modulename`.

Improve the code depending on dyLibName and remove the special case where
we were called within an executable and dyLibName was not set.

This patch is another try to fix the assert in the incrementals.

karies/root,root-mirror/root,olifre/root,olifre/root,olifre/root,olifre/root,root-mirror/root,olifre/root,karies/root,karies/root,olifre/root,root-mirror/root,karies/root,olifre/root,karies/root,karies/root,olifre/root,karies/root,root-mirror/root,olifre/root,root-mirror/root,root-mirror/root,karies/root,karies/root,karies/root,olifre/root,root-mirror/root,root-mirror/root,karies/root,root-mirror/root,root-mirror/root,olifre/root,root-mirror/root