SpectralVariance: reworked percentile method

    - use @mcoughlin percentil method
    - fixed dodgy imports and variables (no functionality change)