[1.7.x] Refs #21230 -- removed direct settings manipulation from signed cookies tests

Backport of b9bfcd82f0 from master