Fixes for orbit drawing routine (DrawTrail) ...

... to handle line segments that wrap around the map edge, and to fix the behavior near the poles.  Plus a couple of optimizations to reduce trail drawing costs.