dtsession: fix screen saver/locking on linux
The POSIX __linux__ commit broke the special detection on linux used
to determine whether a secure system was in use or not.
This commit reworks the logic a little bit to avoid special casing
linux in main().
It also reworks the logic in CanReAuthenticate() to fix up some issues
"fixed" to correct converity warnings. The logic in this case was
mostly ok, but still didn't account for the proper usage of this
function. Error detection improved somewhat as a result.