BUG: change real output checking to test if all imaginary parts are zero

Some arrays like `poly([1j, -1j, 2j, -2j])` should produce real output but don't.

I think this was meant to be `sort_complex(conjugate(...` rather than `conjugate(sort_complex(...`, which would work, but checking that the imaginary parts are exactly zero is equivalent and simpler anyway.