More wsh build-out, cleanup of env-related helpers across xpconnect and wsh.