Former US president Donald Trump has lost his attempt to avoid handing over his tax returns to Congress.