Surface-plasmon–polariton excitation of optical microcavities and second-harmonic emission