Influence of channeling on scattering of 2–15 GeV/c protons, π+, and π− incident on Si and Ge crystals