ENH: optimize array creation from homogenous python sequences

Instead calling PyArray_DTypeFromObjectHelper for each item in a
sequence, check if all items in the sequence are of the same scalar
type, if this is the case we only need to recurse on one item.
Also use the PySequence_Fast API to avoid expensive function calls for
the common case of lists or tuples.

np.array(range(10)) improves about 25%
np.array(range(100)) improves about 40%
ENH: use fast sequence API for setArrayFromSequence

reduces runtime of function by about 10%
ENH: use fast sequence API for discover_dimensions

reduces runtime of function by about 20%
Merge pull request #4567 from juliantaylor/obj-array-create-opt

ENH: optimize array creation from homogenous python sequences
ENH: release GIL for a[..., bool] type indexing

set _save to NULL in NPY_END_THREADS to simplify some code
Merge pull request #4570 from juliantaylor/index-gil

ENH: release GIL for a[..., bool] type indexing