A "brave and heroic" father has died after being struck by a train while trying to rescue his twin daughters whose pram had rolled on to the tracks in Australia.