Characterizing neutrino and neutron fluxes from the Spallation Neutron Source for the COHERENT experiment