Fix cookies methods in BrowserTestCase (GPFUNCTIONALTEST-115)

Several bugs were fixed for cookie management