Optimizing Ray-Triangle Intersection via Automated Search