Nanoscale subsurface dynamics of solids upon high-intensity laser irradiation observed by femtosecond grazing-incidence x-ray scattering