Fix pool.end to handle queued connections

fixes #797