graph: fix last_end is infinite

If last_end exists but is infinite, timespec_cmp() would assert-fail,
called from update_to_svg().

Fix it to handle infinity properly.