Reorganised the flow control completely
May also have been rotating things in the wrong direction...

Results so far are promising - stringent testing to be done
Simple script to run multiple tests for different orbital speeds
Looks like the orbital calculation is giving incorrect argument of periapsis
or true anomaly (or both)

Calculations correct if body position.x>0
Incorrect if <0
Have thoroughly established that the problem is argper

In some cases, argper should be 2pi - argper

Plotting orbit tracks for argper and 2pi -argper shows that
if one is right, the other is wrong (and vice versa)
Seems to be fixed - using (n x e) .h appears to select correctly:

(n x e).h > 0.0 --> omega = 2pi - omega

Running stress tests to check
Stress tests passed for i=0, i=pi

This should be sufficient for use in Android

Merge this with master, and then try to fix other i cases