[algorithms/detail] Fix for_each_range backward compatibility.

In the specialization for Box remove_const before creating box_view<> and passing the object of this type into the Actor::apply().