Photon-number parity of heralded single photons from a Bragg-reflection waveguide reconstructed loss-tolerantly via moment generating function