The server-side twin of theme.js's resolution, for ui <- function(request):
?theme=dark|light in the query string, else the cc_theme cookie
(Domain=.calcofi.io, set by any CalCOFI site's toggle) — honoured only
beside its cc_theme_src=user marker, i.e. when the visitor chose it (brand
v2's persistence rule: a v1 page's default can never leak in) — else default.
Pass the result as mode to cc_brand_header() so bslib's switch starts in
the right state and the page never flashes the other colour.
Usage
cc_theme(request = NULL, default = c("light", "dark"))