core::rt: Add a test of standalone use of the runtime
core: Use a global lock instead of runtime lock for os::getenv, etc. #4726
core: Replace use of libc::getenv with os::getenv
core::rt: Initialize logging