The Political Economy of Open Borders: Theory and Evidence on the Role of Electoral Rules