Cookie domain parsing adjusted

The changes make sure that cookie wildcard domains always follow the
pattern ".<domain_name>", independent of the domain that was configured
in the config.ini.php for the key "cookie_domain".