Disable mysql tests for now
Keep a single usedOperationSets array rather than one per DBSession.
The array is at file scope in NdbTransactionHandler.  
It does not grow past 4000 elements (a literal constant).  
Underlying DBOperationSet native objects are freed when the wrapper is
placed in the recycler array.
Don't try immediate startTransaction() unless using async api.
merge
WL#7626 Implement many-to-many relationships for Document Composition

This change implements many-to-many relationships via join tables. The user
maps a many-to-many relationship to a join table which must contain (at least)
two foreign keys, each of which defines the relationship from columns on the
join table to corresponding columns in one of the related tables.

As part of this change, error handling is improved for mapping errors.

API-documentation/TableMapping:
  Add error field to TableMapping, which stores errors detected both during
    mapping definition as well as errors detected dynamically when the mapping
    is used.

API-documentation/Projection:
  Add error field to Projection, which stores errors detected when using the
    projection.

api/Projection.js:
  Use the error field to collect errors. Eschew throwing errors.
  
api/TableMapping.js:
  Use the error field to collect errors. Require the constructor to have a
    table parameter of the form [database.]table.

api/UserContext.js:
  Update createSector to create all sectors for all projections. If a projection
    includes a relationship, create the sectors for the top-most projection, 
    and then create the sectors for the next projection. Repeat until all
    nested projections have had their sectors created.
  Handle join tables in createSector and validateProjection. Require that
    many-to-many relationships have either targetField or joinTable in the
    mapping. 

impl/mysql/MySQLConnection.js:
  Add support for join tables. For join table sql generation, define a join table
    alias and generate the sql, e.g. 
     ... t1 LEFT OUTER JOIN customerdiscount AS t15 on [t1.k = t15.k and...] 
  Add the sql statement and keys to the error information to better track
    sql generation errors

test/api/FieldMappingErrorTest.js:
  Add field mapping tests
  t1 mapField with no parameters
  t2 mapField with empty string
  t3 mapField with numeric field name
  t4 mapField with numeric parameter
  t5 mapOneToOne with empty string
  t6 mapOneToOne with missing field name
  t7 mapOneToOne with missing targetField
  t8 mapOneToOne with missing target 

test/api/TableMappingErrorTest.js:
  Add table mapping error tests
  t1 missing table in TableMapping constructor using literal
  t2 TableMapping constructor with bad table 'a.b.c'
  t3 non-string in TableMapping constructor
  t4 no parameter in TableMapping constructor
  t5 TableMapping constructor with bad table 'a b'
  t6 applyToClass with a non-domain object (constructor)

test/composition/ProjectionErrorTest.js:
  Add projection error tests
  t7 many-to-many relationship with a bad join table name
  t8 many-to-many relationship with no join table
  t9 many-to-many relationship is not mapped
  t10 many-to-many relationship neither side defines joinTable
  t11 one-to-one relationship neither side defined foreignKey

test/composition/ProjectionTest.js:
  Add tests for many-to-many relationships
  t6 many to many with join table defined on this side
  t7 many to many with join table defined on the other side
  t8 many to many with no results

test/composition/create.sql:
  Add row to customerdiscount for test

test/composition/lib.js:
  Add relationship to Discount to allow mapping either Customer-Discount
    or Discount-Customer
  Improve error reporting for null values
Refactor connection handling to prepare for connection pooling

mysql/MySQLConnection.js:
  delegate close to MySQLConnectionPool

mysql/MySQLConnectionPool.js:
  add getConnection to create a new connection
  add releaseConnection to end a connection
  implement dbSession.close to release the connection
  re-implement getTableMetadata to use getConnection and releaseConnection
  re-implement listTables to use getConnection and releaseConnection
Initial implementation work on BLOB support for NDB adapter.

A BLOB is represented as a Node Buffer, and the underlying calls 
to read and write the BLOB content directly access the underlying
buffer.
Use Error SQLState 0F001 "Bad BLOB" (actually a "Locator Exception")
if value intended for a BLOB column is not a Buffer.
Test that storing a non-BLOB in a BINARY column gives error SQLState 22000
Add BLOB column to stringtypes test suite & confirm that existing tests
pass with a mapped (but unused) BLOB field.
Succesful insert into BLOB column
Improve spi test error reporting

test/spi/SmokeTest.js:
  improve readability of test failure message
Add suggestion to user to maximize performance of updates

API-documentation/Session:
  * To efficiently perform read/modify/write, the user should find the object,
  * modify the fields to be updated, set the fields *not* to be updated
  * to undefined, and call session.update on the object.
Improve error reporting for connecting to database

api/UserContext.js:
  report errors from DBConnectionPool.getDBSession
  improve error handling when getting multiple SessionFactory objects
    for the same DBConnectionPool
Fix tests that do not close session after running test
Implement connection pooling for mysql adapter

SPI differences with connection pooling:

No pooling:
var connection = mysql.createConnection(properties);
connection.connect(callback);
connection.query(query);
...
connection.end(callback);

Pooling:
var pool = mysql.createPool(properties);
pool.getConnection(callback(err, connection);
connection.query(query);
…
connection.release(); // no callback

API differences with connection pooling:

Connection pooling is specified using the connection properties
  mysql_pool_size: default 10 specifies the maximum number of pooled connections
  mysql_pool_queue_size: default unlimited specifies the maximum number of
    connection requests that can be queued waiting for a connection

impl/mysql/mysql_service_provider.js:
  add default connection pool size of 10

mysql/MySQLConnection.js:
  reuse the TransactionHandler to keep track of autocommit

mysql/MySQLConnectionPool.js:
  adapt user-visible mysql_pool_size to felix driver connectionLimit
  adapt user-visible mysql_pool_queue_size to felix driver queueLimit
  modify getConnection and releaseConnection to use felix protocol if pooling
  remove early stub connection pooling in MySQLConnectionPool

test/api/PromisesTest.js:
  add rollback to tests to avoid leaving open transaction after test

test/lib/harness.js:
  flag tests that leave an open transaction after test

test/t_basic/TransactionTest.js:
  add rollback to tests to avoid leaving open transaction after test
Finish read & write BLOB implementation for NDB adapter
update cmake & gyp build lists
merge
Fix crash on stub commit / stub rollback