Partial cross sections for multipion photoproduction off deuterons at energies up to 5 GeV