Propagate env vars and working dir to all cloned commands, remove

unnecessary shadowing attributes, use ptr instead of value for
anonymous embed to make sure we never get mutation-of-copy
surprises, small test improvements.