Subarcsecond near-infrared imaging of ultraluminous IRAS galaxies