Added a method to Factory which allows the template cache to be cleared.

This is similar to what we got for StyleSheetCache.