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
Merge pull request #342 from dlax/tnc-ndarray

ENH: optimize: use ndarrays instead of lists in TNC; separate tests from optimize