Two-Photon Mode Preparation and Matching Efficiency: Definition, Measurement, and Optimization