Dynamical heterogeneities in irreversible gels: analogy with spin glasses