ENH: Improve cryptic error messages for invalid FFT sizes

fft([]) used to produce "error: (n>0&&n<=size(x)) failed for 1st keyword n: zrfft:n=0".  Now it says "ValueError: Invalid number of FFT data points (0) specified."

BUG: Also fix my previous error message for fftn that would raise TypeError if s were a tuple.
TST: Add tests for invalid fft sizes
DEP: stats: Deprecate randwppf and randwcdf
DEP: stats: use np.deprecate to emit a warning
Fix small issues and improve formatting in optimize tutorial
Add Result class to optimize API docs
DOC: optimize: Jacobian vs. gradient

Use the more common (at least where I come from) term "gradient" in
favor of "Jacobian" in the optimize.minimize docstring. The two are
synonymous here, since minimize only does scalar optimization.
hyp1f1: evaluate ratio of gammas via log(gamma)
BUG: make ndimage.label properly merge adjacent objects (fixes #3025)

ndimage.label() uses a table of label values that should be merged in
a postprocess.  The logic updating this table was faulty.  In
particular, if objects A and B were to be marked for mergin, having
already been marked to merge to C and D, respectively, the implied
merge of C and D was not being inferred.
ENH: linalg: Add a function to compute the DFT matrix.
DOC:Add freqz magnitude plotting example

Mention a callable that produces the expected plot
add test for #3025
Added 'wrap' as a vaild mode for savgol_filter.
allow sph_inkn for order n=0
minor documentation/error message corrections

added trivial + simple tests
Merge pull request #3039 from WarrenWeckesser/dft_matrix

ENH: linalg: Add a function to compute the DFT matrix.
Merge pull request #3033 from thouis/master

BUG: make ndimage.label properly merge adjacent objects (fixes #3025)
Merge pull request #3018 from larsmans/jacobian-gradient

DOC: optimize: Jacobian vs. gradient
Merge pull request #3010 from cdeil/optimize_docs

DOC: optimize: add Result to API docs + fix tutorial
Merge pull request #3007 from EvgeniBurovski/randwcdf

DEP: stats: Deprecate randwppf and randwcdf