Ensure Cookie::get() will immediately return results.

Without this change, a call to Cookie::get() immediately after Cookie::set()
won't return the value provided.  This creates some unintuitive edge-cases,
although to date it looks like they have been worked around.

The patch doesn't have a test because our testing framework doesn't deal
with cookies well.
Merge pull request #2068 from sminnee/cookie-fix

 Ensure Cookie::get() will immediately return results.