Guard against a connection object having its state list grow without bounds
This can happen if you create a long lived connection object that is used by different threads. If new threads are being created all the time, each one will cause a new state entry. The previous version relied on the connection objects being destroyed and created. This version keeps track of the state list and it will be trimmed during garbage collection.