Correct the counting of stored and queued cookies
Tallies of the stored and queued cookies are maintained in total_cookies and unread_cookies. The values are returned in HTTP_EnumerateCookies. Both have errors in their calculation.
The queued cookie count continued going up even when MAX_COOKIES_IN_QUEUE was reached and older cookies were being discarded. Also errors in the counting and the condition meant that two more cookies were queued than defined in MAX_COOKIES_IN_QUEUE.
The total_cookies count was reduced when a cookie was discarded from the queue via HTTP_ConsumeCookie because destroy_cookie is used for freeing a cookie structure in both situations. The count was also reduced in two situations where new cookies were not added to the store because they were invalid. One case was HTTP_AddCookie if an invalid parameter was given, and the other case was in creating a cookie via an HTTP response.
To solve this the total_cookies decrement operation is moved from destroy_cookie to remove_cookie_from_list.
I have also corrected a comment in the code, which had a misleading "not" in.