BUG: add swig filetype headers

The swig files use C++ features so they should be declared as C++.
Some files even lie and declare themselves as C which causes a build
failure if one re-swigs with setup.py.
Remove typo from merge conflict
DOC: Use raw strings to avoid double backslashes in docstring math, as per PEP 257
DOC: Fix definition list formatting
DOC: Add missing type, fix list formatting
MAINT: Remove variables assigned to but never used
MAINT: use ndarrays instead of lists as inputs in tnc

Drop custom function PyList_AsDoubleArray().
MAINT: use ndarray instead of lists to pass to python functions

Drop custom function PyDoubleArray_AsList().
MAINT: use ndarray for gradient

Drop custom functions PyObject_AsDouble() and PyList_IntoDoubleArray().
TST: separate tests of optimize and tnc (moved to test_tnc.py)
FIX: use PyArray_SimpleNew and memcpy instead of PyArray_SimpleNewFromData in tnc
FIX: don't use PyArray_Type in ParseTuple in tnc
FIX: check the return of PyArray_FROM_OTF in optimize/tnc

To detect invalid types in particular.
FIX: eliminate asarray in tnc python code

Rely on C code for type check and casts
STY: drop docstrings from test_tnc; PEP8
MAINT: drop asarray for gradient in tnc, allow any sequence and check in C
FIX: add missing import_array() in python 3 init of TNC
DOC: typo of 1/sqrt(2), tweak Bessel filter notes
Merge pull request #342 from dlax/tnc-ndarray

ENH: optimize: use ndarrays instead of lists in TNC; separate tests from optimize
Merge pull request #497 from juliantaylor/swig-filetypes

BLD: sparse: add swig filetype headers to sparsetools

setup.py may use these when generating the files
(but this is not enabled in the current build setup)