Improved logging in the example script

- Add --verbose option to enable DEBUG logging.

- Add timestamp and log level to the output format.

Change-Id: I11ca42095d7ee24782d39141fae20b8b26695fff
Fix #5: Move json parsing and error handling into the event factory

Pass the raw string into the event factory and parse it to a json
object there.  If the string is not valid json, generate an error
event.

Add a unit test for handling of invalid json on the event stream.

Change-Id: I209a89fd28c3a594b71443fc106e25d58c5cc1ea
Fix #6: Support the "merge-failed" stream event

Change-Id: I3308b44dc1bbfcaa70e38cb4857c2241c551cfa4
Fix #7: Support the "reviewer-added" stream event

Change-Id: I72ece72c08ddc6da31c14db35dd84f35d61d39ed
Fix #8: Support the "topic-changed" stream event

Change-Id: I70b9cbea1da20a1434eea39e3d8e85e94357b792
Fix #9: Add a bit more detail in the documentation

- How to install
- Prerequisites (platform, SSH config)
- Link to the Gerrit page
- Link to the example script and license files

Change-Id: I0c24609e1ea89be55a68ebf4a1569c26f23e5a66
Allow example script to continue if errors are received

Add an option to ignore error events and continue receiving.

Connection errors are not ignored and will still result in the
script exiting.

Change-Id: I807fa50700eb6970b7fbabe48c499fe513717c4d
Fix #11: correct handling of `identityfile` in the ssh config

The `identityfile` element of the result returned by SSHConfig.lookup()
is a list, not a string, therefore calling `expanduser` on it results
in a crash.

Change-Id: I8673295d66cac9ca3b522867735b1211f0556d21
Fix initialisation of error event

Change-Id: I19e955c3ca7c84600ec89ff24d5c7458202ff609
Add missing __repr__ methods on ErrorEvent and UnhandledEvent

Also fix a minor coding style issue.

Change-Id: Ib366a816e5cf979eb94c7ce545d1c87c6c3984c8
Completely refactor the stream event handling

Instead of using select.select() to wait for input, use the methods
provided by paramiko's client channel object.

Read from both stdout and stderr, and send ErrorEvent if anything is
received on stderr.

Ref #1
Fix #12

Change-Id: Ic67392cb9d689a1f457f5d02eb17a5432112a0c0
Fix #10: Allow to manually specify ssh username and port

If the username and port are specified when constructing the client,
they will be used instead of attempting to fetch from the ssh config
file.

In this case the full hostname of the server is required, rather
than only the name as listed in the ssh config.

Change-Id: I82b8638d99922c9b40a54a8275ffc085f505696f