Simplify and improve performance of shortest_angular_distance().

Passes tests.