extract sort keys directly from logical plan so pipeline builder doesn't...

... have to see through groups and other operations; fixes #201