Tuple slicing

This is a small PR to allow for slicing of tuples, in a similar fashion as is done for lists. In fact, the code here is inspired by the corresponding code in `lists.cpp`.