Was able to move the loadstring changes into api.lua. Also makes _G = api.env

I think having _G = api.env makes it so that modifying _G is modifying
the root environment for the emulation. Just seems better to me. Plus
it made the re-location of the loadstring fix easier.