JBTIS-260: Fixes function failures in preview and VDB execution

* Due to TP tightening up driver definition validation, the preview and
  query teiid functions fail with NPE. This is due to the custom created
  teiid driver being created with an invalid template id.

* Reduces the need to create a custom teiid driver by trying to find and
  use the three existing drivers provided by the client runtimes

* If a custom driver has to be created then an ad-hoc template is also
  provided to ensure that such drivers satisfy the validity criteria