Allow customising the HTTP Cache-Control defaults.

Fixes #3501
Merge branch 'fixes/flexible-cachecontrol-defaults' into 3.1-jtch