Statistical pion and hard photon production in medium-energy heavy-ion collisions