csharp: Fix running headless tests in dotnet
Summary:
CoreCLR, the runtime of dotnet, has some issues regarding storing
environment variables (see dotnet/coreclr issue #15812), keeping them in
a local cache instead of flushing to the native setenv.
This commit replaces the usage of
System.Environment.SetEnvironmentVariable with a setenv wrapper.
Test Plan: Run without DISPLAY set and with dotnet.
Reviewers: felipealmeida, brunobelo, segfaultxavi, YOhoho
Reviewed By: brunobelo
Subscribers: cedric, reviewers, committers
Tags: efl
Differential Revision: https://phab.enlightenment.org/D10619