Quantization of surface plasmon polariton on the metal slab by Green's tensor method in amplifying and attenuating media