Helical jets in blazars. Interpretation of the multifrequency long-term variability of AO 0235+16