Two-point entanglement near a quantum phase transition