Properly handle request restarts with cookie munging and restoration

Change-Id: I445b11abdbd903c60b97620c72b8eb5755dc598a