Rotation periods for cool stars in the open cluster Ruprecht 147 (NGC 6774)