BUG: gh-2790, fix column scaling in polynomial package least squares.

The columns should be scaled using their 2-norm, but in the complex case
that was being incorrectly computed as the square root of the sum of the
squared elements rather than as the square root of the  sum of their squared
real and imaginary parts.
TST: Add Test for column scaling in the polynomial package fits.

The test uses the complex set of sample points [1, 1j, -1, -1j] whose
squared sum is exactly zero. This would fail before the column scaling
was fixed.
MAINT: Use a better method to detect complex arrays.

Instead of

    if lhs.dtype.char in np.typecodes['Complex']:

use

    if issubclass(lhs.dtype.type, np.complexfloating):
DOC/FIX: fix example in ctypeslib module documentation

Fix some inconsistencies in the example. The library is loaded as '_lib' not
'lib' in the rest of the example. Also, the function is called 'foo_func' not
'foo'
Merge pull request #2960 from esc/doc/fix/ctypeslib

DOC/FIX: fix example in ctypeslib module documentation
Merge pull request #2947 from charris/fix-complex-polynomial-fit

Fix complex polynomial fit
DOC: update 1.7.0-notes.rst from release branch

There were some changes in the release branch that were not put into master.
After this commit, the file 1.7.0-notes.rst is synchronised with the release
branch.