look-ahead: move jerk definitions into config.h templates.
dda: reduce code duplication and simplify.

There are three locations in the code that repeat a pattern of
"If z=0 then use 2d-approx(dx,dy), else if x==0 && y==0 then use dz,
else use 3d-approx".

Teach approx_distance_3 to detect these conditions for us and apply
the same logic.  Replace the three call locations with a simple call
to approx_distance_3.

Binary size for the LOOKAHEAD case drops by almost 400 bytes:

  old:  FLASH : 21242 bytes          149%       70%        34%       17%
  new:  FLASH : 20844 bytes          146%       68%        33%       17%

The size for non-LOOKAHEAD drops by 40 bytes:

  old:  FLASH : 16592 bytes          116%       55%        27%       13%
  new:  FLASH : 16552 bytes          116%       54%        27%       13%

We can actually do a little better if we consider the zero-ness of all
three axes, but this does make the code a little bit bigger. Another
change will consider that option. This change simply tries to mimic
the existing functionality.
dda: generalize the zero-distance case.

When approximating distances, if any axis delta is zero we can
choose to consider only the remaining one(s).

This does increase the code size a few bytes, but is arguably more
accurate in specific "lateral move" cases.
Add gnuplot script to explore approximate_distance.

Error is less than 5% for explored range [0,200000].
dda: move dda_find_crossing_speed() to dda.c.

This is a preparation towards going through the existing movement
queue backwards with dda_join_moves() to allow higher feedrates
for lots of short movements.
dda: use the already calculated distance for crossing speed calculation.
dda_lookahead.c: remember movement distance to avoid recalculation.
approx_distance: much more research into dist approximation

approximate_distance.plot now derives the appropriate values to
be used for 8-way fine-tuning of the fast distance approximation
algorithm.  It produces 3 graphs:

  * A unit circle chart showing the locations of the 8
    sample points chosen for the algorithm.

  * A 2D graph of the measured actual error values using the
    derived values and the approximation algorithm with X
    fixed at 10000 and Y along one axis.  Note the scale
    of this graph is in percent.  The y-axis ranges from 0 to
    0.4%.  The maximum error is less than 0.15%.  That is,
    when the actual distance is 100000, the approximated
    value will be between 99850 and 100150.

  * A 3D graph of measured actual error values for all X and Y
    between 0 and 2000.  One of these graphs is zoomed in to show
    the noise of the low level, and another one is zoomed out
    to show just how mirror-smooth it really is.
approx_distance: Improve accuracy of 2d and 3d funcs

Fine-tuning the approx-distance 2d function gives accuracy better
than 99.8% in all cases.  Extending this to the 3d version gives
it also accuracy better than 99.7% in all cases.

Code size is reduced by another 440 bytes, but RAM utilization
increased by 32 bytes.