Reopen stream, error reporing and minor fixes

This pull request fixes a bug with reopening streams, adds a timeout to souphttpsrc, fixes sending of multiple error messages for the same event and cleans up code.

Executable commands have been inserted into preformatted code blocks in README.md.