The judge in the civil fraud case against former President Donald Trump has received hundreds of threatening messages, court filings show.