Fixes for IOStream, ImageDevice, and Waiter

IOStream.Read no longer defines the encoding of the returned string if
no string encoding is specified; ImageDevice and Waiter now properly set
LastError in several places