Cookie Domain for subdomain (#1031 and #936)

COOKIE DOMAIN must be set in config if user want to use COOKIE DOMAIN.

Please consider to put DOMAIN HOST at config.php too…

THis is pull request for #1031 and #936 .