Use parametrized IDictionary instead of Dictionary where we can
Use IDictionary<K, V> for for connectionErrors

Data has to be IDictionary for compatibility with IOException's signature.
No need to cast here
Ditto
Ditto
Explain why we need a cast to ICollection here
Compile
Lock the entire handleAckNack body

Because SynchronizedCollection instance methods aren't thread-safe after all,
according to the docs.