Make SST's Connection::closeConnections thread safe.
Make SST's Connection::closeConnections thread safe.

Add locking to Connection::closeConnections so it's thread safe. It is
no longer only being called during the final destruction of SST data,
so it wasn't safe to assume only one thread was running code
anymore. Locking needs to be handled carefully since the mutex being
used isn't recursive. To handle this properly we remove each
connection from the set while locked, save the shared_ptr, then only
reset it after releasing the lock. Fixes #514.

sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata