Add helper to enumerate USB serial devices

This will be used in the Ruggeduino detection code.
Add a wrapper for Ruggeduino communication

A list of these will be presented in Robot.ruggeduinos for use by
competitors.

Change-Id: I2ead5aced4dd2c58ecd081bb3012db00ba819b15
Ruggeduino: Retry commands to ruggeduino

When the serial port is first opened the Ruggeduino resets, this means
that you need to poll it until it comes up.
Ruggeduino: Implement analogue read
Ruggeduino: Remove the bool complexity
Ruggeduino: Add the beginnings of some docstrings
ruggeduino: Add a lock for the serial device

A Ruggeduino object may be used from multiple threads.  Locking is
therefore required for talking to it, as otherwise commands and
responses may become interleaved.  This patch adds a lock and makes
everything use it.
Modify motor class for the MCv4

Change-Id: I0da2f962442c1de29916ba3d427b173adcc1047c
mcv4: Add a serial device lock

Since the Motor and MotorChannel objects can be used from different
threads, their access to the serial device needs to be managed by a
lock.  This patch adds a lock and makes them use it.

Change-Id: I0ffd42e72a32021903a73295fe2ca22aec846f12
Add support for motor controller enumeration

Use pyudev to find the motor controllers.  Store them in a dictionary,
where they can be accessed either with an integer index, or their
serial number.  This allows teams to simply use an integer, and then
later when they discover that this is annoying when they remove a
motor controller, the serial number.

Change-Id: I8e9e03c54a2e05482132897e4cfcf01c71ac9275
Don't take the motor board lock twice

Change-Id: I5662258053652fe073df450bf93c57e97bf1b63e
Introduce sr2014 marker types
Work around a bug in the MCv4B:1 firmware

The version 1 firmware has a bug that means setting the speed/direction
of a channel sets the direction on that channel and the speed on the
other channel. This works around that problem by keeping track of the
state of the motor board and always setting both channels. The direction
is set on the correct channel (with the stored speed), and the speed set
on the other channel (with the stored direction).

Change-Id: Id47db025ec6973e462bb978fa06d30d85a050041
Fix a couple of bugs with motor board enumeration

Change-Id: I79db257939ec16f7ae3369d4b2351bac52527c90
Merge branch 'master' into ruggeduino
Add pyudev

Change-Id: I314359245e00ddb30d6d9e7177cd11a6eebdee04
Enumerate ruggeduinos

Change-Id: I5911ca8852d13a23de67c37c770158ee71758f76
Merge "Introduce sr2014 marker types"
Export ruggeduino pinmode constants

Change-Id: I9c5182065575a3c1c375af2b87986869cf91b94f