Cosine Representations of Abelian *-Semigroups and Generalized Cosine Operator Functions