new methods and fixes, add comments for all

Update getCookie(), addHeader(), sendHeader().
Add getCookie() and $unserialized_cookies.
Add comments for all methods and properties.