Manipulating maps and winning elections: measuring the impact of malapportionment and gerrymandering ☆