Add a test that shows the problem.
1dffda85b0a0bc2d417c0b8fd97dffb1202e33bd broke sorting if fed from Select.
Close input after loading sorter.
Fix state check to be an error, not a silent disabling.
merge MMcM: Fix sorting from Select

Merge pull request #915 from MMcM/akiban-server/sorter-close-input
https://github.com/FoundationDB/sql-layer/pull/915