Quantum-fluid description of the free-electron laser