Three-pion scattering: From the chiral Lagrangian to the lattice