scripts/dfuutil: support both "alternate setting" name and number

Initial assumption with Arduino 101 was that the "alternate setting
name of the DFU interface" would be simple enough to be used as the
grep pattern when attempting to find the board in DFU mode.
However, for boards such as the 96Boards Carbon, this name includes
grep meta-characters, so the DFUUTIL_ALT environment variable is
provided as a numeric value, instead of the previously expected name
string.
In order to avoid false positives, we now check whether DFUUTIL_ALT
is a numeric value, and the grep pattern is adjusted accordingly to
search for either "alt=" or "name=".
Also take into account that the name might contain spaces.

Change-Id: I81351d03bd727b35093fd1280e2b8b6904f3c89b
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
1 file changed