A United States appeals court has ordered President Donald Trump to hand over eight years worth of tax returns to New York prosecutors.