Theory and measurements of emittance preservation in plasma wakefield acceleration