Improve thread channels logic

While using thread channels, likely each thread is only interested in
some kind of events. This change modifies `channel` class to provide
a predicate object that determinates whether a given event is valid
or not. By default the predicate accepts any event.

This change also improves the error codification in `mosquitto_client`.
Fix a bug in `mosquitto_client`

A client that doesn't succeed to connect to the broker is left in a
inconsistent state. The mosquitto handler is not destroyed, and
therefore the connect messages may be still travelling all around. If
a new broker appears that is able to response to the connect messages,
the connect handler will be invoked on an already destroyed client
object.

This commit fixes the bug, but a more robust approach could be
implemented using a FSM to track the client state and avoid
unnecessary or illegal actions to be executed in destruction.
Integrate all tests into a single executable

One executable per test suite is a explosion of binaries that causes
long term compilations and a lot of subprojects to be generated in the
IDE.

This change integrates all the tests in two executables: one for
unit test and other one for integration tests. This applies to liboac
project. More projects coming next.