Default encoding for writable streams.

This commit adds a method for setting and retriving
the default encoding for writable streams.

Fixes 7159