Picosecond hot-electron energy relaxation in NbN superconducting photodetectors