Refactor to make CookieJar iterable.