device: don't accept empty names for sigrok channels
It's unexpected when sigrok channels "have no name". Previous versions
would not strictly enforce non-empty names and could let empty names
slip in, but application code was reported to be confused when it
happened. The benefit of having channels "with no names" is questioned.
Adjust the public API routines. Accept missing name specs in the
sr_channel_new() routine for maximum backwards compatibility. Reject
missing names in sr_dev_channel_name_set() so that empty or non-empty
names can only be replaced by non-empty names. Check the return code of
sr_channel_new() in sr_dev_inst_channel_add() so that failed channel
creation gets propagated to callers. The current implementation will
never fail sr_channel_new(), but future versions might.
None of libsigrok code (device drivers, input modules) assign empty
names to channels. Applications still need to get checked. A future
commit might make names in sr_channel_new() mandatory.