Optical studies of V404 Cyg, the X-ray transient GS 2023+338. IV. The rotation speed of the companion star.