Smooth path extension logic to line up with the grid

The hooking paths now follow the path as specified to see where it
ends up, then clamps the end point to the grid.  The end point is traced
backwards so the end straightened path segment is tangent to the hook that
preceeds it, then the path is rebuilt using updated metrics that
produce a path that ends on the grid boundary