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.
Feature: --no-cache takes a regexp to ignore matching lines in Dockerfile

- modifies CLI and server to accept a regexp for no-cache
- adds defaultable flags to mflag to support existing bool no-cache
- applies to matching RUN and ADD lines

Docker-DCO-1.1-Signed-off-by: Tim Ruffles <oi@truffles.me.uk> (github: timruffles)