Removed support for per-tower arm length offsets. It was always useless.
Depth (Z) correction doesn't work with probe offsets, so now the code won't let you use both at the same time.

There is a nasty filesystem bug (no, it isn't my fault) resulting in /sd/config-override corruption when you typ M500. Instead, type M503, copy+paste to a text editor, remove the timestamps from the beginning of each line, and copy+paste that into config-override by hand. (Or just run all the commands every time you start the printer, but that will take forever.) There are some upstream changes I haven't synced. Hopefully they will fix the problem.

To-the-edge probing: The usual 5x5 grid results in a diamond-shaped probing pattern, which omits the edge of the print surface in some places. To solve this, we do the following:

* = test point (inside or outside probe_radius)
/ = edge of probe_radius

Out  A     In
*    /     *

1: Sample at point A
2: Calculate slope between In and A
3: Project elevation at Out based on that slope and its distance from In
4: Set that elevation as Out's elevation

Therefore, when the probe returns to point A in the future (with depth correction enabled), it will be at the same elevation it determined before. We don't have to do anything to tell the interpolation routine, get_adjust_z(), because it already measures those points. Loading and saving will work in exactly the same way, as well.

---

"Virtual Shimming" - Support for ThreePointStrategy-style bed leveling has been added. Given the elevations at the three test points (I use the ones near the X, Y, and Z towers) it will figure out the surface normal and use that to adjust the Z component of the printer's coordinates. This is called "virtual shimming" after the shimming approach mentioned in a thread about fixing Z=0 errors on the SeeMeCNC forums. The surface elevations for the three tested points are saved using M667. ABC = test point elevations, E0 and E1 control whether it's enabled. At the moment, depth map-based correction is controlled via G31 B, but I think it'll move to M667 since it would make more sense there.

Forward and inverse kinematics simulators upgraded to work with virtual shimming.

G32 (iterative calibration) has been fixed. The crash when using probe offsets has mysteriously gone away. I suspect it's due to memory consumption, since it worked before and is relatively isolated from the things that have been changed since it was working before. I suspect it will be necessary to take further steps to conserve memory, such as breaking off some of the class stuff into sub-classes that can be instantiated as needed. I am not able to get the code to run at all when the depth correction grid is 9x9 elements, which suggests that we're running out of RAM. Reverting to 5x5, while changing nothing else, makes the code work again.

Found a bug in simulated annealing, specifically the annealing of three-variable systems (endstops, tower radii, etc.) It was improperly using live variables in simulation and leaving them where they are at the end of the simulation, which is NOT where they should be. This has been solved by saving the variables, and then restoring them afterwards. It seems the annealing was able to "get around" this bug due to the random-move-towards algorithm.

Depth map-based correction now saves the surface elevation array to /sd/dm_surface_transform. This is nice because people who don't have a touch probe wired into their controller can take readings and then type them directly into the file. I tried to save them using G-codes, but it was a nightmare. There is some file corruption bug that crops up when you ask it to write too many bytes at one time.

G31 letter instructions are different to accommodate the addition and removal some calibration types.

G31 B is now M667 Z.

Per-tower arm lengths have been disabled. I've never been able to get anything useful out of them, and I am dubious as to whether they might be useful at all. However, I'm leaving support enabled for this in the linear delta arm solution in case someone out there might have some use for it. It doesn't add much in terms of RAM (three floats?), and it doesn't add anything in terms of the CPU cycles burned by the kinematics routines.

find_optimal_config(), part of the simulated parallel annealing routines, used to use logic such that if energy_min < energy_max it would do one thing, else the other. The "other" is now elaborated into if energy_min > energy_max, allowing for the routine to do nothing if the min and max energies are the same.

Added find_nearest_test_point(), a routine that finds the index of the test point nearest some coordinates.

Test points can now have three states (active, neighboring active - used for to-the-edge probing, and inactive.)

Shortened some strings and removed some unneeded variables to reclaim RAM.

Z-correction depth map and virtual shimming merged into one data structure.

Most lines printed by this class have five-character prefixes, e.g. "Depth mapping" would be displayed "[DM] Depth mapping". Having the same prefix stored in tons of strings wastes memory, so _printf now goes to a method that emulates the functionality of printf(). This method increases the code size by a few KB, but there is a net LOSS of several KB from not having to store the same stupid prefixes over and over and over. I also tried doing a #define where it prints the prefix and then does THEKERNEL->streams->printf, but that made the code size a good 10-15KB more than it is the way I have it now, so that was abandoned.

In order to make method prefixes work properly and automatically, a stack system is used that can hold several prefixes. When you enter a method, you call push_prefix("XX") where XX is the method's prefix code. When you exit, you call pop_prefix. The stack can hold 6 prefixes, which should be deep enough, and it has overflow and underflow protection so that you can't push or pop too many times.

Added __printf() (_printf without prefix, good for when you want to print partial lines) and newline().