swr: clean layouts before checking sanity

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr/rematrix: Fix handling of AV_CH_LAYOUT_STEREO_DOWNMIX output

Fixes Ticket2859

Note, testcases related to the downmix channels are welcome.
(id like to make sure this is working correctly now, as obviously it didnt
 work before ...)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>