Add a persistent attribute to set if Cookie is persistent  or not.

This changes add an attribute to this module (persistent with default 1) which set if cookies are persistent like previous versions or session-like and are deleted (persistent=0) when browser is closed by user.

This changes solves also some little bugs.