cleanup connections on close.

Addresses #88.