Collinear and helical phases of the monoclinic and rhombohedral antiferromagnet. Application to the α- and β-phases of solid oxygen