Add config.h wrapper to simplify test automation

Test code which wants to customize config.h can do so without
touching config.h itself by wrapping config.h in a macro variable
which is passed in to the compiler.  It defaults to "config.h" if
no override is provided.

This change would break makefile dependency checking since the selection
of a different header file on the command line is not noticed by make
as a build-trigger.  To solve this, we add a layer to the BUILDDIR path
so build products are now specific to the USER_CONFIG choice if it is
not "config.h".
make Makefile-{SIM,AVR,common} more generic

Allow stock makefile variables to be overridden by 'make' caller
so the user's 'Makefile' can be authoritative.

See Makefile-example for usage.
DRY: Reduce duplication in Makefile-AVR

Refactor the "sizes" code into a parametric make function and
reformat it for readability.
DRY: Reduce duplication in platform Makefiles

Move builds for non-avr target (simulator) into a $(BUILD_FLAVOR)
build subdir (build/sim) to isolate it more completely and
cleanly from the AVR builds.  This allows AVR and SIM to use common
build rules again.

Move newly bits out of Makefile-{SIM,AVR} and into Makefile-common.
Update URLs for new github location
simulator: Respect XYZE_INVERT_DIR settings

Simulator assumes a basic set of config pins.  Most it ignores
and redefines.  But the INVERT_DIR pins it did not, and these
could be useful to simulate.  So teach Simulator to respect them.
deriv.awk: Calculate derivative of every column

Instead of just two columns (x and y) in the trace file, treat
every column as a function and calculate the first derivative
of it without regard for its supposed "meaning".  In addition
to getting more data from this, it also allows us to calculate
the 2nd derivative easily by running the script again on the
resulting data.

Also convert time in column 1 from microseconds to seconds.