Fix demo code

Fix the provided examples so that they run with the latest Google App Engine SDK.
Fix timing attack

Makes HMAC comparison to avoid potential timing attacks. A timing attack would allow an attacker to "craft" (trough a series of requests) a valid HMAC for any cookie. Here is a good introduction to them: http://codahale.com/a-lesson-in-timing-attacks/

Note: I was unable to exploit the flaw either locally or in a production setup (even tried using a high-quality datacenter network), but that doesn't mean that someone smarter couldn't :sparkles:
Merge branch 'fix_timing_attack'