Electronic structure of aperiodic polymers. I. The average-matrix method and the effect of a cluster of impurities on the band structure of a periodic system