Added warnings to travis building.
Fixed segfault when logging was enabled.

m->chats[c] can be NULL if more than one group chat is created and
one of the first ones is deleted.