Absolute calibration of single-photon and multiplexed photon-number-resolving detectors