Allows choosing device by serial number rather than device index which can change.

Whether this code is approved or added as is I would like to see the functionality added so that a device can be chosen by serial number rather than the device index as is currently the case.  The code fro this function was taken from the rtl_sdr repository located http://cgit.osmocom.org/rtl-sdr/tree/src/convenience/convenience.c