Collective quantum dot inversion and amplification of photon and phonon waves