This adds support for flashing to multiple devices, by implementing the
$MOTES option used by the Z1.
This replaces the $PORT interface, as it only allowed flashing to one
device at a time, and the $MOTES interface was still used for other
tasks (such as getting a list of connected devices).
A foreach loop is used to dynamically create an upload rule per device
that needs to be flashed.
The "main" upload rule depends on the device specific ones.
This allows for parallel flashing.
The PORT variable can still be sued for backwards compatibility.
Changed the MOTES variable that makes a $(shell) call to not be
recursively expanded.