SmrSession: avoid calling setcookie in tests
SmrSession: avoid calling setcookie in tests

If we use `SmrSession::init()` in a test, then PHPUnit will report a
failed test due to "headers already sent" (due to the prior CLI output
from PHPUnit).

Though we want to ensure that `setcookie` is called for all normal
page requests that need it, we guard it with a `headers_sent()` check
to prevent it from being called in CLI programs and tests.

An alternative would have been to set a special variable when running
tests, and check for that before calling `setcookie`, but that seemed
more complicated.

hemberger/smr,smrealms/smr,smrealms/smr,hemberger/smr,hemberger/smr,hemberger/smr,smrealms/smr