Add fix for bad read in percentile_weightnening
Add fix for bad read in percentile_weightnening

Ensure that percentile_weightnening kernel does not read past the end of
the array by passing the size of the input array and ensuring read index
is strictly less than that size

cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy