Mesoscopic physics of photons