class library: SplayAz doesn't break when inArray is single item
Also resamp1 avoids division by zero when array is of size 1
fixes #1045.