#497

This adds cache invalidation for posted comments and changes the place
where the static cache is applied. Cost of the latter on my test system
is a 17% increase in time to load the page when the cache is used.
Merge remote-tracking branch 'origin/master' into Static-Cache
Missing change
release id 5e19bab1a7
Merge remote-tracking branch 'origin/master' into Static-Cache
#497

Check if caching is enabled before serving a page from the cache
#497

fix possible race conditions
Fix cachefilename for news categories
variables declared global are always "set"
comment handling cleanup
fix #497
Merge remote-tracking branch 'origin/Static-Cache'