Photodetection and Measurement: Maximizing Performance in Optical Systems