[AIRFLOW-5210] Make finding template files more efficient (#5815)
[AIRFLOW-5210] Make finding template files more efficient (#5815)

For large DAGs, iterating over template fields to find template files can be time intensive.
Save this time for tasks that do not specify a template file extension.

(cherry picked from commit eeac82318a6440b2d65f9a35b3437b91813945f4)

owlabs/incubator-airflow,owlabs/incubator-airflow,owlabs/incubator-airflow,owlabs/incubator-airflow