Adding page.addCookie and page.cookies, as well as some unit tests.