Adds thread attribute to connections

Adding a thread attribute to connections allows us to pick which thread to close when a connection closes. As of now, I'm not sure if the correct thread is being associated with each connection (I think multiple connections are under each thread).