Enable construction of TruncIndex from id array.

Fixes #5166

Current graph.restore is essentially O(n^2 log n) due to how
suffixarray creation works.

Rather than create/append/create new this supports creation from a seed
array of ids.

Functional testing shows this eliminates the hang on Creating image
graph reported on list.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Add benchmark tests for TruncIndex.

Compare add vs new.

Some historical data in PR #5172.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Merge pull request #5172 from pnasrat/5166-large-image-graph-restore

Enable construction of TruncIndex from id array.