misc.c->env.c split: move environment.c code ...

to env.c
This is the last step in this PR, which removes environment.c and
squashes all its code into os/env.c