Close file descriptor leak in sys.process.
Close file descriptor leak in sys.process.

This closes most file descriptor leaks in sys.process through
the simple expedient of making sure every InputStream being read
by BasicIO is closed once there's nothing more to read.

A single file descriptor leak would remain for the OutputStream
(that is, that process stdin) of each Process, which is closed after the
InputStream being read to feed it is closed. Special care is taken
not to close the calling process stdin.

Fix an additional non-reported by where sending data to a process
that had already terminated would result in an exception being thrown.

File descriptors can still leak in some conditions that must be
handled by user code. Documentation to that effect will follow.

Closes SI-5439.

felixmulder/scala,shimib/scala,lrytz/scala,jvican/scala,lrytz/scala,martijnhoekstra/scala,jvican/scala,lrytz/scala,lrytz/scala,jvican/scala,felixmulder/scala,scala/scala,martijnhoekstra/scala,shimib/scala,scala/scala,shimib/scala,jvican/scala,martijnhoekstra/scala,slothspot/scala,jvican/scala,scala/scala,felixmulder/scala,shimib/scala,shimib/scala,jvican/scala,lrytz/scala,felixmulder/scala,felixmulder/scala,martijnhoekstra/scala,martijnhoekstra/scala,slothspot/scala,slothspot/scala,scala/scala,slothspot/scala,lrytz/scala,slothspot/scala,shimib/scala,scala/scala,felixmulder/scala,felixmulder/scala,slothspot/scala,scala/scala,jvican/scala,martijnhoekstra/scala,slothspot/scala