Redirect output to the logger. Closes #3134.

Redirects:
    - the standard output
    - the standard error
    - the twisted log output
to the logger.
Add tests for the StreamToLogger class.
Merge remote-tracking branch 'ivan/feature/3134_redirect-output-to-logger' into develop