Fill the process environment with an BAREOS_CFGDIR

When we parse a configfile we push the directory we found it in into the
process environment as BAREOS_CFGDIR so you can use that same directory
as %BAREOS_CFGDIR% on windows and $BAREOS_CFGDIR on UNIX when
referencing an other configfile in that same directory.
MINGW now supports SetThreadExecutionState

The MINGW version we compile with in OBS supports
SetThreadExecutionState so lets use it.
Cleanup win api compat layer.

Implemented str_2_BSTR and BSTR_2_str and reformated the code a bit.