AutoTest: fix fly_mission to recognise end of mission

Copter's behaviour after completing a mission has changed so it does not
automatically switch to Loiter mode but rather stays at the last
waypoint.  This was confusing the fly_mission function.