debug.h: Align M111 debug bit codes with Repetier-Host.

No code changes, binary size and performance kept.
DDA: Move axis calculations into loops, part 7.

Clean up code to reduce duplication by consolidating code into
loops for per-axis actions.

Part 7 is, turn update_current_position() in dda.c partially into
a loop. Surprise, surprise, this changes neither binary size nor
performance. Looking into the generated assembly, the loop is
indeed completely unrolled. Apparently that's smaller than a
real loop.

    SIZES             ATmega...  '168    '328(P)    '644(P)    '1280
    FLASH : 20270 bytes          142%       66%        32%       16%
    RAM   :  2302 bytes          225%      113%        57%       29%
    EEPROM:    32 bytes            4%        2%         2%        1%

short-moves.gcode
Statistics (assuming a 20 MHz clock):
LED on occurences: 888.
Sum of all LED on time: 279945 clock cycles.
LED on time minimum: 306 clock cycles.
LED on time maximum: 722 clock cycles.
LED on time average: 315.253 clock cycles.

smooth-curves.gcode
Statistics (assuming a 20 MHz clock):
LED on occurences: 9124.
Sum of all LED on time: 3297806 clock cycles.
LED on time minimum: 311 clock cycles.
LED on time maximum: 712 clock cycles.
LED on time average: 361.443 clock cycles.

triangle-odd.gcode
Statistics (assuming a 20 MHz clock):
LED on occurences: 1636.
Sum of all LED on time: 546946 clock cycles.
LED on time minimum: 306 clock cycles.
LED on time maximum: 712 clock cycles.
LED on time average: 334.319 clock cycles.
DDA: Move axis calculations into loops, part 8.

Clean up code to reduce duplication by consolidating code into
loops for per-axis actions.

Part 8 is, move remaining update_current_position() into a loop.

This makes the binary 134 bytes smaller. As it's not critical,
no performance test.

    SIZES             ATmega...  '168    '328(P)    '644(P)    '1280
    FLASH : 20134 bytes          141%       66%        32%       16%
    RAM   :  2302 bytes          225%      113%        57%       29%
    EEPROM:    32 bytes            4%        2%         2%        1%
dda.c: make update_current_position() even smaller.

Saves another 24 bytes.

    SIZES             ATmega...  '168    '328(P)    '644(P)    '1280
    FLASH : 20110 bytes          141%       66%        32%       16%
    RAM   :  2302 bytes          225%      113%        57%       29%
    EEPROM:    32 bytes            4%        2%         2%        1%

Using muldiv() would be more accurate, but unfortunately, the
compiler bails out:

   static const axes_uint32_t PROGMEM steps_per_mm_P = {
                                                           ^
dda.c:889:1: error: unable to find a register to spill in class ‘POINTER_REGS’
 }
 ^
dda.c:889:1: error: this is the insn:
(insn 81 80 83 6 (set (reg:SI 77 [ D.3086 ])
        (mem:SI (post_inc:HI (reg:HI 2 r2 [orig:103 ivtmp.106 ] [103])) [3 MEM[base: _82, offset: 0B]+0 S4 A8])) dda.c:881 94 {*movsi}
     (expr_list:REG_INC (reg:HI 2 r2 [orig:103 ivtmp.106 ] [103])
        (nil)))
dda.c:889: confused by earlier errors, bailing out

Another one is, calculating this:

   (int32_t)get_direction(dda, i) *
   move_state.steps[i] * 1000 / pgm_read_dword(&steps_per_mm_P[i]);

produces nonsense values for negative returns from get_direction().
Apparently, the compiler doesn't want to divide negative values???
Odd. Anyways, sufficient parentheses solve the problem.
dda.h: comment on these direction flags and other things.
DDA: Move axis calculations into loops, part 9 (last part).

Clean up code to reduce duplication by consolidating code into
loops for per-axis actions.

Part 9 is, finally use this set_direction() thing. As a dessert
topping, it reduces binary size by another 122 bytes.

    SIZES             ATmega...  '168    '328(P)    '644(P)    '1280
    FLASH : 19988 bytes          140%       66%        32%       16%
    RAM   :  2302 bytes          225%      113%        57%       29%
    EEPROM:    32 bytes            4%        2%         2%        1%
Trivial cleanups.

Fix some formatting and hide a couple of variables when they're
not being used.
DDA: Rename confusing variable name.

'all_time' sounds like forever to me, but this variable really
tracks the last time we hit one of "all the axes".  It sticks
out more now in looping, so rename it to make sense.
Datalog: show traced data as signed ints, not unsigned.
home: Reduce duplication with axis arrays