Inhomogeneous critical current in nanowire superconducting single-photon detectors.