BoundedList improvements

This reverses the parameters to BoundedList, and it adds instances for Foldable and Functor.