Fixes setcookie to only send one Set-Cookie header per name
Minimum fix to get setcookie only used once per name

Uses a static HashTable to store the cookie names.

Uses thread-safe global variable.

Cleanup the patch

Uses PHP_RINIT and PHP_RSHUTDOWN to handle lifetime

Puts the RINIT and RSHUTDOWN where they should be