rawhid: don't kill write thread on USB write timeouts

Write timeouts are recoverable.  No need to kill the
write thread in this scenario.
openocd: add auto rtos detection for f3 boards
comusbbridge: ensure module only runs when ports configured

The ComUsbBridge module was consuming all available CPU
when it was builtin since that code path wasn't checking
the usart and vcp port before starting up the tasks.
flyingf3: fix up external i2c bus init and irqs
i2c vm: add i2c virtual machine
api: let all firmware builds see the API shared with the GCS

This API allows some internal structures to be shared between
the GCS and the flight code.

This should ONLY be used when you need to establish some kind
of additional structure inside of the data fields inside of a
UAVO.  This should NOT be used to avoid using a UAVO for any
reason.
gen-i2c: add a generic I2C sensor module

This module can be used to drive the I2C virtual machine
with either a built-in program or one provided by the
user in the I2CVMUserProgram UAVO.
gen-i2c: use generic i2c module on flyingf3
ut: fix up unit test clean target name
i2c vm: extend ALU and refactor

* Register state and RAM are now stored directly in the
  I2CVM UAVO struct to save memory
* Add generalized handling of short-immediate (simm) data
  in opcodes.  simm data is treated as a signed, 16-bit value.
* New opcodes:
  * SET - rd = sign_extended(simm)
  * SL  - logical shift left (reg <<= simm)
  * ASR - arithmetic shift right (unsigned_reg >>= simm)
  * LSR - logical shift right by (signed_reg >>= simm)
  * AND - logical AND (reg AND reg)
  * OR  - logical OR (reg OR unsigned_simm)
  * ADD - addition (rd = ra + rb, rd += simm)
  * MUL - multiplication (rd = ra * rb, rd *= simm)
  * DIV - division (rd = ra / rb, rd /= simm)
* I2C transfers can now occur from any offset in virtual RAM
* dropped floating point registers
* explicitly fault on NULL or zero-length programs
gen-i2c: update demo programs to match new VM opcodes

Now supports mathtest for basic ALU tests and endiantest for
testing endian conversion routines.
i2c vm: add unit test suite for the I2C virtual machine

Nearly all opcodes and many boundary conditions are tested.

Does not test I2C transfers yet.
i2c vm: convert all parameter docs to doxygen format
gen-i2c: split demo programs out from the main module

Built-in i2c virtual machine programs are now each stored
in their own .c file so that they don't clutter the main
module source.

This also allows new i2c vm programs to be maintained out-of
tree with less merge conflicts.
vm mag/baro: sign extend and scale magnetometer readings

This is also an example of how to sign extend in the VM.

Use logical shift left followed by an arithmetic shift right.
i2c vm: try to make i2cvm UAVO update in UAVO browser
i2c vm: add unit test coverate for JUMP and BNZ
Merge branch 'next' into i2c-vm

Conflicts:
	flight/targets/FlyingF3/Makefile
i2c vm: move UAVO init into module initialize function

All UAVOs must be initialized in the module init() routine
and *NOT* in the start() routine or they may not be noticed
by the Telemetry module.

The telemetry module scans the list of UAVOs at the beginning
of its start() routine.  Any UAVOs initialized after this scan
will not be noticed by the Telemetry module, and as such will
also not have any update events registered against them.

This will lead to the UAVOs never being updated via telemetry.
This affects periodic as well as onchange modes.
Merge pull request #154 from PhoenixPilot/stac/i2c-vm

I2C Virtual Machine