Use the common WELS_CLIP3 macro instead of a custom reimplementation
Use an inline function instead of a macro for clipping which contains rand()

When using a macro, the macro parameters get evaluated
multiple times, which means that the rand() value compared
actually isn't the same that is used as return value.

This makes sure that clipping works as intended for the
random tests.
Increase the minimum frame size in a test with multiple spatial layers

Make sure the input frame size is large enough that the downsampled
layers also have a nonzero resolution.
Merge pull request #1640 from mstorsjo/fix-tests

Fix occasional failures in some tests