repl. LoopConcat with LoopSum Inflate in AtSample
repl. LoopConcat with LoopSum Inflate in AtSample

The majority of the `Sample` objects being used in Nutils is of the kind
`_DefaultIndex`, which has a monotonic increasing set of indices. This implies
that `_DefaultIndex.eval(func)` is equivalent to concatenating `func` evaluated
for all elements. This is exactly how `AtSample`, used by `Sample.eval`, is
currently implemented: a `LoopConcatenate` of `func`. `Topology.locate` returns
a `_CustomIndex` sample that reorders the `AtSample` using a `Take`. The `Take`
of `LoopConcatenate`, however, turns out to be difficult to sparsify.

This patch replaces the `LoopConcatenate` with a `LoopSum` of `Inflate`, where
the indices of `Inflate` follow from the indices of the `Sample`, which
eliminates the `Take`. This seems needlessly complex for the `_DefaultIndex`
samples, because the indices are consecutive `Range` objects. However, after
sparsifying the `LoopSum` of the current implementation, the same
`LoopConcatenate` with `Range` indices are introduced, leading to equal or very
similar sparse function trees.

wijnandhoitinga/nutils