A Multidomain Spectral Method for Scalar and Vectorial Poisson Equations with Noncompact Sources