Fix #95: Restrict platforms the P/Invoke SetEnvironmentVariable.

Only platforms with native code support should be using P/Invoke.
Fix #92: Fix failing TeamCity builds.

TeamCity builds were failing on test_cgcheck because
generate_reflected_calls.py was not updated.
Use Stream.Null for File.open('nul').
Replaced CLR2 compiler define with FEATURE_CORE_DLR when generation ReflectionCache.
Changed LF to CRLF for generated files.
Added missing method "File.realpath"
Added default constructor for Encoding (mainly for Marshal.load).
In IOWrapper use "pos","eof","eof?" methods if defined. Added missing method to GZipReader (pos, tell, eof?, eof). Added missing method to GZipWriter (pos, tell).
GzipReader: Get encoding from options (:external_encoding).
Load assemblies only once.