Fix cookie on redirects to same domain URLs with path compoment empty

If the first URL is http://foo.com/something and it redirects to http://foo.com?bar=baz, cookie jar thinks its a different domain.

This workaround this issue by normalizing URLs.