updated bridgeserver to track outgoing streams and properly close all streams on terminate