taskd.pl: compute prior heads state and pass to Notify::ref_changes