Index templates: Made template filtering generic and extensible via plugins

Added the ability to register template filters that are being applied when a new index is created. The default filter that checks whether the template pattern matches the index name always runs first, additional filters can also be registered so that templates can be filtered out based on custom logic.

Took the chance to add the handy source(Object... source) method to PutIndexTemplateRequest and corresponding builder

Closes #7459
Closes #7454