Fixing problem deciding when to close a connection

When a user had multiple cameras, the streams where added multiple times in the
control array, and the connections where never closed.
Included handling of connection failed and connection closed
Implemented event for stream stopped

Now the event STREAM_STARTED and STREAM_STOPPED are sent only with the streams
that actually started or stopped. Also, now a status change may trigger a
STREAM_STOPPED event, before it only triggered STREAM_STARTED events.