Debugging output to telemetry channel

Use optparse-applicative to properly handle command line arguments.

Add command line flag "--debug" to fire of a thread to listen to the
telemetry channel coming from the daemon.

Correct loop in telemetry client.