Reworked cookie expiry testsuite to be less brittle.