Add 2 tests, 1 of which fails, to isolate the digest_caching behaviour causing #12521

If config.action_view.cache_template_loading = false, most likely in a development
configuration if config.cache_classes = false &
config.action_controller.perform_caching = true.

config.action_view.cache_template_loading defaults to the value of config.cache_classes
Ensure ActionView::Digest.cache is correctly cleaned up when
ActionView::Resolver.caching = false.
update changelog
update digestor code based on review
add a new local variable to track if digests are being stored, to ensure the cleanup works correctly
Merge pull request #12540 from wyaeld/bug/fix-recursive-digest

Ensure ActionView::Digestor.cache is correctly cleaned up
Ensure the state is clean after one failure