file.readline(): Use mp_obj_str_get_data() and fix off-by-one error on EOF.