Adds template dependencies rake task from cache_digests gem.

This adds the rake tasks `cache_digests:dependencies` and `cache_digests:nested_dependencies` from `cache_digests` gem.
Merge pull request #12376 from tvdeyen/cache-digests-rake-tasks

Adds template dependencies rake task from cache_digests gem.