An appeals court has ruled that President Donald Trump's hush money case can be moved to a federal court.