C0-semigroups and mean ergodic operators in a class of Fréchet spaces