ENH: scipy.spatial.distance: use BLAS and waste less memory

This module was using np.linalg.norm instead of the SciPy version,
which switches to BLAS when appropriate.

The change to sqeuclidean makes it four times faster for length-1e5
random vectors using NumPy 1.6.2 linked against ATLAS 3.8.4:

>>> %timeit ((u - v) ** 2).sum()
1000 loops, best of 3: 2.01 ms per loop
>>> %timeit u_v = u - v; np.dot(u_v, u_v)
1000 loops, best of 3: 552 us per loop
small changes
TST: linalg.qz test fails for complex64, so lower test tolerance.

Appears to be an ATLAS regression (3.8 is OK, 3.10 is not).  Closes gh-2842.
enhanced signal tutorial
TST: sparse: catch right error type

Numpy had a bug that caused a wrong error come up here; catch the right
one.
BUG: sparse: fix dtype casting in dok_matrix __add__ and __truediv__
corrected dB in amplitude response
DOC: rename the shapes for randint distribution.

Make them match the numpy random_integer generator's.
DOC: rename the shape parameter for Von Mises distribution.

Now it matches the numpy one.
further signal tutorial enhancements
DOC: change the shape name for vonmises in stats tutorial
Fixed integer division in indices.
added detrend and spectral estimation
Fixed integer division in indices.
MAINT: remove LyX files from stats tutorial docs
BUG: io/wavfile: safer writing directly from buffer

Fixes gh-2928
Merge pull request #2933 from pv/wavfile-buf

BUG: io/wavfile: safer writing directly from buffer
Merge pull request #2916 from pv/ufunc-fix

BUG: sparse: minor bugfixes
Merge pull request #2920 from ClemensFMN/db_correction

DOC: signal: corrected dB in amplitude response examples
BUG: spatial.distance: always convert to float in sqeuclidean

Integers are subject to silent wraparound in the subtraction and
squaring operations, as pointed out by @jakevdp. Some unnecessary
copying may occur, but any call where both arguments are float
arrays still only allocates a single temporary array.