index: Support creating indices without sorting

See issue #176.