Issue #11480: Fixed copy.copy to work with classes with custom metaclasses.

Patch by Daniel Urban.
Fixes issue #15798: subprocess.Popen() no longer fails if file
descriptor 0, 1 or 2 is closed.
The errpipe_write fd will always be >= 3.