[winrt support] Disabling usage of some banned APIs for the Windows Runtime

Adding a macro for turning on/off for debugger support. Attaching a debugger is disabled if running tests for the Windows Runtime.

Disabled some usage of environment variables, which aren't avaliable, when under the Windows Runtime.

Replaced one usage of CreateFileA, which isn't allow in the Windows Runtime with fopen.
same remark as line 81 here