B"H web ui: backend - check ground validity before altitude validity

Before, even when an aircraft was on the ground, validaltitude was 1
instead of -1. This is because when MODES_ACFLAGS_ALTITUDE_VALID flag
was true, no further checking would be done, and validaltitude would be
set to 1. However, the MODES_ACFLAGS_ALTITUDE_VALID can be true when the
aircraft is on ground, so the ground status must be checked before the
altitude validity flag.