Protesters have gathered outside the courthouse where former US president Donald Trump is set to be arraigned on criminal charges.