This introduces a new util function in geometry_utils which snaps a vector
to axes or 45 degree lines. This can be used whenever you want to
snap a vector to these angles, but still want it to stay on a grid.
This snapping is used for the dimension tool and the ruler tool.
This is substantially simpler for two-point tools that the method
used by the line tool, which uses DIRECTION_45.
Fixes: lp:1780826
https://bugs.launchpad.net/kicad/+bug/1780826