Use default OS shell to run system commands

Instead of using os.system which uses /bin/sh, this uses subprocess.call (the replacement of os.system) to run the command using the default shell of the OS. With this, one can use more advanced commands for bash, zsh, ksh, ...

I do not have a win32 system to test this modification, so maybe line 2236 can also be changed like 2239.
Use default OS shell to run system commands

Instead of using os.system which uses /bin/sh, this uses subprocess.call (the replacement of os.system) to run the command using the default shell of the OS. With this, one can use more advanced commands for bash, zsh, ksh, ...

I also edited the docstring, added comments and fixed the handling of return codes.
Unify exit status from system_raw and system_piped
Add test for exit status from system_piped
Test process exit codes with terminating signal
Merge pull request #4260 from takluyver/system-raw-subprocess

Use subprocess for system_raw

This unifies the exit codes from system_raw and system_piped to use the subprocess model on Unix - positive numbers for exit status, negative for terminating signal.

This doesn't change the situation on Windows. system_raw will give the raw exit code (Windows exit statuses don't appear to include the terminating signal), and system_piped will give nothing - our process_win32 machinery never gets the exit code, and I don't want to go messing around with that.