Re #8564. Just some tidying up.

E.g. use empty() instead of size() == 0, ! instead of == NULL.
Re #8564. Guard against empty text elements in device descriptor pkts.
Merge remote branch 'origin/bugfix/8564_snslivelistener_devicedescriptor_crash'