Update for support enableCookieValidation

IF enableCookieValidation in Yii config, then cookies in doRequest must be serialized and hashed.