what is a stator in a generator