stream: Use mp_obj_is_true() for EOF testing.

Getting a length of string may be expensive, depending on the underlying
implementation.