/Ultraluminous X-Ray Sources Out to z ~ 0.3 in the COSMOS Field