tests: use random masks in testMax (like testMin)

Signed-off-by: Matthias Kretz <kretz@kde.org>
simdarray: generalize min implementation for max

I factored the three code sections that were needed for min into macros
that can now easily implement min and max.

Signed-off-by: Matthias Kretz <kretz@kde.org>