Tuple expressions for sql lib

Creates tuple expressions, to enable paging on multiple-column indexes.
Can you also add a test for the empty tuple case?