stdio: Set readable/writable flags properly

Set the readable/writable flags properly in net streams that have
a handle passed in (such as TTY streams).

Fix #4606
Revert "events: Don't crash on events named __proto__"

Unfortunately, it's just too slow to do this in events.js.  Users will
just have to live with not having events named __proto__ or toString.

This reverts commit b48e303af023dc60b6f6590694ba94d9b8108702.