adds functional test coverage for SAFECOOKIE authentication, including
successful authentication, AUTHCHALLENGE failure, an invalid server
nonce, a mismatched server hash, an invalid-length cookie file, and a
missing cookie file
while working on #35292, i realised we did not have coverage for
SAFECOOKIE authentication either, so i added it here