Role of anion ordering in the coexistence of spin-density-wave and superconductivity in (TMTSF)2ClO4