Add compat layer for text based stream writers

In python2, if a stream has no encoding, unicode is encoded
using the default encoding.  In python3, sys.stdout is already
text based (it expects str() types).

In python2, we introduce a compat layer that will give you a
stream writer that accepts unicode and encodes the contents into
the local.preferredencoding().

Simple repro: tag an ec2 instance with a unicode char and run:

    aws ec2 describe-instances | grep TAGS

You'll get a ascii encode error.  With this change you won't.

Fixes #742.

cc @danielgtaylor