A Utah judge has been suspended for six months over anti-Trump comments he made in court and on social media.