X-Ray and Optical Eclipses in Ultraluminous X-Ray Sources as Possible Indicators of Black Hole Mass