Is it possible to switch an electrical machine several times from motor to generator and vice-versa, within one revolution of its rotor?
This sounds like an x-y problem. 

There are two main timeconstants associated with an electrical machine


Mechanical \$\tau = \frac{J}{b}\$
Where J is the rotor+system inertia and b is the damping coeficient
Electrical \$tau = \frac{L}{R}\$
Where L is the inductance of the stator and R is the resistance of the stator.


Likewise it is highly dependant on the two sources of power. The electrical source to permit motoring and the mechanical source to permit generation. Likewise the ability of both domains to absorb the power flow from the other. 


  how quickly and frequently a reversible electrical machine (EM) can be
  made to switch functions from a motor to generator and vice-versa


Well what do you class as rotating? Different disciplines may have a different requirement of the minimum definition of rotation... conceptually any arc movement is rotating and thus "how quickly" then is dominated by the electrical time constant and the ability to change the direction of the stator current

What about a +-10degree twitch?  359degree? With an ever larger arc being considered, the mechanical time constant become more and more important. If you define "rotation" as a 180degree movement then the load torque as well as the ability of the motor to generator torque will drive the time needed to switch between the two quadrants.

So besides the limitations being within the electrical domain to change between sink &amp; source and the mechanical domain to change between sink and source, one limitation on electrical machines is the spline and at which point it begins to exhibit signs of plasticity.