Cohen-Macaulay squarefree lexsegment ideals generated in degree 2