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