refs #9194. Move permutation calcuations to init.

These are dimensionality and grid size dependent. They can be performed
once because the itertor and mdhistoworkspace at large has a fixed
dimensionality. Avoids having to redo the calculation on every
findNeighbour call.
refs #9194. Kill loops and parralelize remaining loops where possible.

Remove loops that are not required. Use OpenMP to parralelize existing
loops. Major change is to pre-calculate background indexes in parallel
since the calls to BackgroundStrategy.isBackground() could be expensive.