Manually serialize the QVector of events to send.

This will allow to have a better control of the event deserialization.
Add forgotten header guards to EventId.h.
Move the implementation of the class template ClientEvent to the header.

Search "Why can templates only be implemented in the header file?" for
the reason.

Also, now uses the Client class.