Allow passing a log function down to generic-pool
Fix 'chain' helper and add a self-test
Don't clobber connection._events on reset.

We don't add any listeners, so we shouldn't remove them either.

Fixes any-db issue 18