Nonlinear equations with superposition formulas and the exceptional group G2. II. Classification of the equations