Only notify when conn-state changes (fixes #12).

The connection handler now silently drops all connection
events that do not change the state (online, offline, waiting)
of the connection. This means it will no longer print multiple
"Disconnecting..." lines, and it will not print errors
after being disconnected.

Also, the DISCONNECTING event is now only interpreted as
waiting if the connection is not already offline.