Use in cookie a correct path, added DOKU_COOKIEPATH to js constants

Fixes FS#2837

**Question**:
in php `($conf['securecookie'] && is_ssl())` is used to set the `secure` flag. In javascript this is not performed yet. What are the opinions about changing DOKU_COOKIEPATH into an array DOKU_COOKIE_PARAM with entries `path` and `secure` ?