US vice presidential nominees Tim Kaine and Mike Pence clashed over immigration, security, and the economy, during a debate in Farmville, Virginia.