The impact of legal constraints on voter registration, turnout, and the composition of the American electorate