Coordinated control strategy for braking and shifting for electric vehicle with two-speed automatic transmission