child_process: add type checking for "args" param

This commit ensures that the "args" parameter is either:

1. Undefined or null (defaulting "args" to []).
2. The callback parameter (defaulting "args" to []).
3. An array.

All other values will throw a TypeError.

Fixes #8249.

It'll default the args to `[]` at that point; just tried this with `child_process.spawn('echo', '').stdout.pipe(process.stdout); 1` and it doesn't seem to hang.