Support calling a function upon load balancer connection
Support calling a function upon load balancer connection

For things like determining replication lag and ignoring the connection
if its out of spec.

- Make a few methods public so they can be called outside the class, to
  better assist with unit tests and advanced use cases.
- Don't make a connection to the database when calls to
  'setcustommetatype' are made, as a connection is not needed for those
  calls of course.
- If no connection can be established, throw exception.

Fixes #784

ipso/ADOdb,ipso/ADOdb