Coerce args into tuple if necessary.

Same logic as in scipy.integrate.quad.

Fixes #3503 and Fixes #3785.