Knowledge database client

Added new queries.
Client has been made more robust, throwing exceptions when unrecoverable errors are detected.
Client now returns arrays of Rows rather than ResultSet objects.