Moduli of curves and theta-characteristics