Encode cookie values

Encode the cookie values for the AntiForgery cookie with UrlEncoding so that the value will be set properly when trying to validate that the cookie and form token match.

Includes a conversion from ripple => ripple2.