Enhance the foldr implementations of Vect and List to be tail recursive

Now foldr for big Lists/Vects will no longer result in a Segfault