    2 - Add a new Sorted Relation
    -----------------------------
    as for sort, the best thing would be to add a built-in method
    to sort a relation.  something like :
    
    sort(r(X,Y,Z,W),[Z,W], sortedr, optional _increasing_/decreasing flag).
    
    the idea is that the first arg denotes the relation to be sorted, the
    second is the sort-by list, and the third is the name of the relation
    to store the result in.  this is required to be a new relation.
    
    with this, we wouldn't need to do anything special just for write_table,
    and it'd be useful in other contexts as well.  of course, get_next
    on sortedr should return tuples in sorted order!
