Four state attorneys general are examining the fundraising practices of the main online platforms used by the Republican and Democratic parties.