An Analytical Model for the Triaxial Collapse of Cosmological Perturbations