implement client factory; added MySQL driver client; fixes to query builder; lots of other cleanup and fixes