ENH: optimize: curve_fit now warns if pcov is undetermined

Marked the test as a knownfailure for now. The test fails because
assert_warns in numpy.testing should clean __warningregistry__...
FIX: re-enable test for indertemitate covariance warning

Fixed the bogus waring in test_array_like and thus now we can
re-enable the test for the issuing of OptimizeWarning from curve_fit
when the covariance matrix is indeterminate. This works as long as in
the future new tests don't trigger the warning somewhere else in scipy
test suite ;)
MAINT: stats: Add note about change to scoreatpercentile in release 0.12.0.

Also make a test of scoreatpercentile on a 2D array more explicit
about the expected result.

Closes gh-3329.
DOC: sparse.linalg: typo
ENH: sparse.linalg: take LinearOperator in svds

Should allow solving PCA for sparse matrix.
DOC: advertise svds(LinearOperator) + vanity
Fix PEP8 W391 issues (blank line at end of file).
Fix PEP8 E712 issues (comparisons to True).
Misc PEP8 fixes.
BUG: fitpack: avoid a memory error in splev(x, tck, der=k)

for x < t[0], splev(..., der=k) produces garbage or crashes
because of a memory error.

Fixes gh-2188
MAINT: fitpack: trim down compiler warnings (unused labels, variables)
PEP8: fix line too long
ENH: mention OptimizeWarning in curve_fit docstring
Fix _nd_image.geometric_transform endianness bug

* Add _geometric_transform python wrapper to do byteswapping if 'output'
  dtype does not have a native endianness
* Add a few tests with 'ouput' parameter + native and non-native
endianness dtype
MAINT: optimize: remove dead code

ndim of arrays that were previously flattened were being checked.
(The check and flatten could be swapped, but that would change current
behavior.)
Fix for numpy.empty_like in numpy version 1.5

numpy.empty_like does not have dtype parameter
MAINT: remove unnecessary null checks before free

free is required to handle null in all versions of the C standard and
15+ year olds systems which might not comply to this basic requiremnent
likely can't run current scipy anyway.
Patch generated with semantic patch:

    @@
    expression E;
    @@

    - if (E != NULL) {
    -   free(E);
    - }
    + free(E);
ENH: integrate: odeint: Handle exceptions in the callback functions.

Basic idea:  There are C functions that are called by the Fortran solver
LSODA.  These C functions call the user's Python callback function (i.e. the
definitions of the differential equations and Jacobian).  If an error occurs
in the Python code, the C functions set the "number of equations" parameter
to -1 to indicate that an error has occurred.  The Fortran code will now
check for this value, and simply return if it is detected.  The error set
in the user's python code will propagate up to the Python code that called
LSODA, so the user gets the exception.

Change summary:
__odepack.h:
    In the callback functions, instead of calling PyErr_Print() when an
    error occurs, set *n = -1.
multipack.h:
    Don't use PYERR2 (which does PyErr_Print and then sets a new exception).
    Instead, just let the error propagate.
Fortran code:
    Check for neq(1) being -1 on return from calls to user's code.
BLD: special: link _ufuncs against LAPACK
ENH: scipy.special: Implementation of ellipsoidal harmonic functions: first kind, the second kind and normalization constant