Replace point_on_node_side with a better version from ZDoom.
Support maps with > 32k segs.
Remove some unused code.
Revert point_on_node_side to initial version.