[PATCH v3 6/9] gdi32: Factor out emf_eof helper.