Performs ray/box intersection.
Returns true if the ray intersects the box, and the hit time for the entry/exit in tmin/tmax respectively.