Secure elggperm cookie with httponly and secure

Adds httponly and secure option (if HTTPS enabled) on elggperm cookie.
These options are usually set at PHP config level or through .htaccess, but elggperm doesn't use these so we need to set them here.