Improve streamStatus so that it returns NSStreamStatusOpen for the
input stream if there are still data in the buffer, and so it
returns NSStreamStatusClosed for the output stream if the output
is closed but the input is not.

Add a guard to the write method so that it fails and sets streamError
to EPIPE if a write attempt is made after the output stream has been closed.
Add TidbitsTestBase.framework, and share the Tidbits.framework scheme.