Fix JDBC-80 by adding with-db-metadata and metadata-result and improving tests to exercise them.