QObject::destroyed is emitted from the QObject destructor, because of
that the object that inherit from it (in this case DeviceLink) will not
exist anymore, hence we can't cast to it.
So we are saving the needed information in an QObject property so we
do not have to do any cast.
Packages always end in \n, so this way we make sure we have a complete
package to unserialize. Before this patch, some long packages that were
divided in chunks weren't received correctly.