Chemical lasers: A thermodynamic analysis of a system in disequilibrium