y4m: fix eof detection during header parsing

Evaluating an istream as a bool returns the file status.  When ifs was converted
to a stream pointer, these while loops needed to be changed because a bool
evaluation of a pointer is always true if the pointer is not NULL