Pull Req: 248 - Make order of cookie loading with the same name configurable
Introduced a private method for setting the document to use in tests.
Updated tests to run without setting cookies to document.cookie.
Synchronized with the 2.x version of cookie:
Changes formatting of date from toGMTString() to toUTCString() (trac#
Updated remove() so that it no longer modifies the options object that
is passed in (trac# 2527838).
Changed behavior for Boolean cookies (those that don’t contain an equals
sign). Previously, calling Cookie.get() on a Boolean cookie would return
the name of the cookie. Now, it returns an empty string. This is necessary
because IE doesn’t store an equals sign when the cookie value is empty
(“info=” becomes just “info”).
Added Cookie.exists() to allow for easier Boolean cookie detection.
Removed check for cookie value before parsing. Previously, parsing checked
for name=value, now it parses anything that is passed in.
Removing the last subcookie with removeSub() now removes the cookie if the
removeIfEmpty option is set to true. (trac# 2527954)
Added option to disable url encoding/decoding by passing options.raw to
set() and get(). (trac# 2527953).
Changed get() to take an options object with raw and converter
properties. If a function is passed instead of an object then it is used
as the converter for backward compatibility (trac# 2527953).