Health officials in turmoil over 11th-hour backflip on aged care algorithm override powers, emails reveal