Allow larger arrays up to size 8192 for PeriodicWave
Larger arrays are allowed, and no errors are thrown if the array is
larger than what the implementation would use.
Also took this opportunity to slightly optimize the computation of the
input signal and the culling of the extra partials.
And finally fixed a bug where the 0-th element of the imaginary array
was not always being ignored as required. This is tested