Move EnvChecks into lib.environment, make hasOptifine flag, make unsupp logging configurable.