TilingPath had some bugs when working with single-point segments,
which exist outside of the official mods. This change fixes a few
problems:
- Avoid unbounded length zero-cost, zero-progression loops that could
be formed by an arbitrary number of single-point corners. These
could pop up arbitrarily in the middle of paths.
- Avoid zero-progression loops short-circuiting looped paths.
- Fix missing end type matching during back-tracing stage.
- Enhance lint check to ensure starts/ends have a valid directions.
- Remove some dead code.