Multi-phase double-porosity homogenization for perimeter functionals