Asymptotic analysis of Mumford-Shah type energies in periodically-perforated domains