[AIRFLOW-5345] Allow SqlSensor's hook to be customized by subclasses (#5946)
[AIRFLOW-5345] Allow SqlSensor's hook to be customized by subclasses (#5946)

Due to security reasons we have an alternative PostgreSQL hook that fetches credentials dynamically.
We would still like to use the `SqlSensor` functionality as is as our hook is still backed by sqlalchemy.
By extracting SqlSensor's `connection.get_hook` into a method we can override the `_get_hook` method without affecting the functionality of the hook.

(cherry picked from commit a8cb800662d674369d17d773fcfd3fcfac6bb2f5)

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