licq: pass signals and events as shared_ptr's

Avoids memory leak in case plugin isn't ready to handle signal or it it has
been shutdown