Electron-ion correlation and finite-size effects in quantum Monte Carlo simulations