Effect of time-varying freestream on performance and vortex dynamics of forward and reversed pitching airfoils