New campaign-finance data indicate a tightening Republican primary while Trump’s legal woes boosted his fundraising.