Dominating ideals and closed neighborhood ideals of graphs