child_process: spawn() does not throw TypeError

Ensure TypeError is thrown, fix a bug where `env` option was
assuming the option was actually an object.

This case is especially bad because it then sets `env == null`
instead of using `process.env`.

Fix #7456

Signed-off-by: Fedor Indutny <fedor@indutny.com>
Merge remote-tracking branch 'upstream/v0.10' into v0.10