Adding caching and better CSRF defaults for XHR requests

Closes #78: Have CSRF ignore XHR requests when enabled
Closes #79: Enable caching according to settings