streams: Make .write() support arbitrary objects with buffer interface.

This in particular fixes writing str vs bytes.
modsocket: Make .send() support arbitrary objects with buffer interface.

This is CPython-compliant (except that CPython doesn't support buffer
protocol for str).