The pion form factor in lattice QCD