Compares a cookie against a URL's scheme and host and determines if the cookie should be set