The IRAS 1 Jy Survey of Ultraluminous Infrared Galaxies. I. The Sample and Luminosity Function