Added a double-pulse test mode, more compile options, cleanup.

The double pulse test is a short test that allows us to see the
switching behaviour of the power stage. The 1st pulse lets current
build up in a stalled motor (or equivalent inductor) and then a
second pulse ends the test. The switch off of the 1st pulse and the
switch on of the second pulse are the relevant parts of the test,
it's where the built-up current is switched on-off.

Added macros to control inclusion of several feature in the compilation
(such as the ADC and the OCA), n order to allow code space for other
functionality such as the double-pulse test.
New attempt at measuring motor (driving) current.

Current change during the PWM period should be marginal (ripple),
typically <5%, should never be >10%. Therefore we can relax the
requirements and sample the current shunt at the beggining of the
ON period instead of at the end, thus making it so much easier.
Works decently, oscilates too much at very low currents (no load
on motor) and oscilates a little when the bridge is doing current
limiting, but I think it's reasonable now. It's reporting about
0.5-1A too much but that's perfectly fine.

The current shunt filter was changed, the resistor was reduced
from 2K2 to 680Ohm. The original values were low-passing too much,
attenuating the signal a lot at the beginning of the PWM period
(where we are now measuring).

Position of OCA and Isens where swapped in the schematics.
Fw i2c: minor optimizations and start condition interrupt infinite
 loop prevention.