Add "expires" option for setting cookie lifetime

This is useful to avoid accumulating old cookies over time, which impacts request size (the 600 day default is a bit generous for our weekly tests).

Also fixes an issue where defaults weren't getting passed through to `setCookie`.