First attempt to save settings in cookies.
Better cookies
Extracted calleach function
Also save template type in cookie.
Save date format setting in cookie
Removed old code for saving date format choise. Replaced by cookie.
Added test for saving settings.