Unify and improve track length calculation code
# Description There are currently three different places that track length is calculated: in the PNS router (for length tuning), in BOARD (for reporting in the message panel) and in the net inspector (for reporting in the table of nets) While for trivial cases they all basically work the same way, the first two apply optimizations to determine correct electrical length (or something closer to it) and the net inspector does not. We should have one way of calculating track length, although there are kind of two algorithms needed: track length between two specified points (needed for length tuning) and track length on the board (needed for reporting). The first one is basically the current PNS implementation (which is not accessible outside the router at the moment) but the second one will need to be developed. # KiCad Version ``` Application: KiCad PCB Editor Version: (5.99.0-10327-g29c45743b7-dirty), debug build Libraries: wxWidgets 3.0.6 Platform: Linux 5.4.0-71-generic x86_64, 64 bit, Little endian, wxGTK, ubuntu, x11 wxWidgets: 3.0.6 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24 Boost: 1.71.0 OCE: 6.9.1 Curl: 7.68.0 ngspice: 31 Compiler: GCC 9.3.0 with C++ ABI 1013 Build settings: KICAD_SCRIPTING=ON KICAD_SCRIPTING_MODULES=ON KICAD_SCRIPTING_PYTHON3=ON KICAD_SCRIPTING_WXPYTHON=ON KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON KICAD_SCRIPTING_ACTION_MENU=ON KICAD_USE_OCE=ON KICAD_SPICE=ON KICAD_STDLIB_DEBUG=OFF KICAD_STDLIB_LIGHT_DEBUG=OFF KICAD_SANITIZE=OFF ```
issue