Ultrashort Pulse Generation in Nanolasers by Means of Lorenz–Haken Instabilities