Drivers often overlook the small black boxes near intersections. But the technology inside them is cleverly changing how traffic lights react to the road.