The theory of C2-cofinite vertex operator algebras