Remove terminated connections from the list of active ones and check
that the termination callback is invoked.